diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-09-13 17:14:31 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-09-13 17:14:31 -0600 |
commit | 9e8c0c2a881100939a63ba4d610af5d26b53938d (patch) | |
tree | 430ac0be6ad787a63212d9465549436f0a0af01b /src/net/brysonsteck/Resurrection/commands/CommandSource.java | |
parent | eec11316107edbd69d97080cebc369e042ce5183 (diff) | |
download | resurrection-9e8c0c2a881100939a63ba4d610af5d26b53938d.tar resurrection-9e8c0c2a881100939a63ba4d610af5d26b53938d.tar.gz resurrection-9e8c0c2a881100939a63ba4d610af5d26b53938d.tar.bz2 |
found lack of saving data if player joins during dead state and resurrects
Diffstat (limited to 'src/net/brysonsteck/Resurrection/commands/CommandSource.java')
-rw-r--r-- | src/net/brysonsteck/Resurrection/commands/CommandSource.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandSource.java b/src/net/brysonsteck/Resurrection/commands/CommandSource.java index 92e51c6..5ac7666 100644 --- a/src/net/brysonsteck/Resurrection/commands/CommandSource.java +++ b/src/net/brysonsteck/Resurrection/commands/CommandSource.java @@ -1,6 +1,7 @@ package net.brysonsteck.Resurrection.commands; import net.brysonsteck.Resurrection.Resurrection; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -10,15 +11,22 @@ import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitRunnable; public class CommandSource implements CommandExecutor { - boolean debug; + boolean DEBUG; public CommandSource(String debug) { - this.debug = Boolean.parseBoolean(debug); + this.DEBUG = Boolean.parseBoolean(debug); } @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { + if (DEBUG) { + Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: The `/source` command was ran by " + commandSender.getName()); + } + if (commandSender instanceof Player) { + 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"); @@ -26,6 +34,9 @@ public class CommandSource implements CommandExecutor { 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"); |