diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2022-01-04 00:36:47 -0700 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2022-01-04 00:36:47 -0700 |
commit | 7ab8389f0f2c61056fccbe827a105413300c0789 (patch) | |
tree | 2ddd89082c6fe6d8311deaa0e053e2007503c101 /src/net/brysonsteck/Resurrection/commands/CommandSource.java | |
parent | 8dcde3ca41f45e899127891dcc64b65a6d432d55 (diff) | |
download | resurrection-7ab8389f0f2c61056fccbe827a105413300c0789.tar resurrection-7ab8389f0f2c61056fccbe827a105413300c0789.tar.gz resurrection-7ab8389f0f2c61056fccbe827a105413300c0789.tar.bz2 |
fixed all System.out calls, added command
Diffstat (limited to 'src/net/brysonsteck/Resurrection/commands/CommandSource.java')
-rw-r--r-- | src/net/brysonsteck/Resurrection/commands/CommandSource.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandSource.java b/src/net/brysonsteck/Resurrection/commands/CommandSource.java index 31481e8..c91e091 100644 --- a/src/net/brysonsteck/Resurrection/commands/CommandSource.java +++ b/src/net/brysonsteck/Resurrection/commands/CommandSource.java @@ -1,11 +1,16 @@ package net.brysonsteck.Resurrection.commands; +import java.util.logging.Logger; + import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.plugin.java.JavaPlugin; + +import net.brysonsteck.Resurrection.Resurrection; public class CommandSource implements CommandExecutor { @@ -17,6 +22,7 @@ public class CommandSource implements CommandExecutor { @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { + Logger log = JavaPlugin.getProvidingPlugin(Resurrection.class).getLogger(); if (DEBUG) { Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: The `/source` command was ran by " + commandSender.getName()); } @@ -25,21 +31,14 @@ public class CommandSource implements CommandExecutor { if (DEBUG) { Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: CommandSender is a player"); } - commandSender.sendMessage(ChatColor.YELLOW + "Resurrection is FREE AND OPEN SOURCE under the"); - commandSender.sendMessage(ChatColor.YELLOW + "GNU Affero General Public License v3.0 via GitHub."); - commandSender.sendMessage(ChatColor.YELLOW + "You can view the repository at " + ChatColor.AQUA + "https://github.com/brysonsteck/resurrection"); - commandSender.sendMessage(ChatColor.YELLOW + "and the license at " + ChatColor.AQUA + "https://github.com/brysonsteck/resurrection/blob/master/LICENSE"); + commandSender.sendMessage(ChatColor.YELLOW + "Resurrection is FREE AND OPEN SOURCE under the GNU Affero General Public License v3.0 via GitHub. You can view the repository at " + ChatColor.AQUA + "https://github.com/brysonsteck/resurrection" + ChatColor.YELLOW + " and the license at " + ChatColor.AQUA + "https://github.com/brysonsteck/resurrection/blob/master/LICENSE"); return true; } else { if (DEBUG) { Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: CommandSender is console"); } - System.out.println("[Resurrection] Resurrection is FREE AND OPEN SOURCE under the"); - System.out.println("[Resurrection] GNU Affero General Public License v3.0 via GitHub."); - System.out.println("[Resurrection] You can view the repository at https://github.com/brysonsteck/resurrection"); - System.out.println("[Resurrection] and the license at https://github.com/brysonsteck/resurrection/blob/master/LICENSE"); - + log.info("Resurrection is FREE AND OPEN SOURCE under the GNU Affero General Public License v3.0 via GitHub. You can view the repository at https://github.com/brysonsteck/resurrection and the license at https://github.com/brysonsteck/resurrection/blob/master/LICENSE"); return true; } } |