aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/commands
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-09-13 16:02:00 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-09-13 16:02:00 -0600
commiteec11316107edbd69d97080cebc369e042ce5183 (patch)
tree77e230e6d7148fbc188f058e8cf1f5629c13b230 /src/net/brysonsteck/Resurrection/commands
parent58ea62e82d78924930b59d75890fe480c556498a (diff)
downloadresurrection-eec11316107edbd69d97080cebc369e042ce5183.tar
resurrection-eec11316107edbd69d97080cebc369e042ce5183.tar.gz
resurrection-eec11316107edbd69d97080cebc369e042ce5183.tar.bz2
testing new debug mode
Diffstat (limited to 'src/net/brysonsteck/Resurrection/commands')
-rw-r--r--src/net/brysonsteck/Resurrection/commands/CommandAbout.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/net/brysonsteck/Resurrection/commands/CommandAbout.java b/src/net/brysonsteck/Resurrection/commands/CommandAbout.java
index 272b4d0..08f0437 100644
--- a/src/net/brysonsteck/Resurrection/commands/CommandAbout.java
+++ b/src/net/brysonsteck/Resurrection/commands/CommandAbout.java
@@ -1,5 +1,6 @@
package net.brysonsteck.Resurrection.commands;
+import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
@@ -7,19 +8,26 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CommandAbout implements CommandExecutor {
+ boolean debug;
String currentVersion;
boolean outdated;
public CommandAbout(String debug, String currentVersion, boolean outdated) {
+ this.debug = Boolean.parseBoolean(debug);
this.currentVersion = currentVersion;
this.outdated = outdated;
}
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
-
+ if (debug) {
+ Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: The `/about` command was ran by " + commandSender.getName());
+ }
if (commandSender instanceof Player) {
+ if (debug) {
+ Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: CommandSender is a player.");
+ }
Player p = (Player) commandSender;
p.sendMessage(ChatColor.GREEN + "" + ChatColor.BOLD + "--- Resurrection ---" + ChatColor.RESET);
p.sendMessage(ChatColor.YELLOW + "Resurrection is a Spigot Minecraft plugin that forces players to wait a certain amount of time before respawning.");
@@ -32,6 +40,9 @@ public class CommandAbout implements CommandExecutor {
p.sendMessage(ChatColor.YELLOW + "For more info on this plugin or to download it, visit the GitHub repository at " + ChatColor.AQUA + "https://github.com/brysonsteck/resurrection");
p.sendMessage(ChatColor.YELLOW + "\u00a9 2021 Bryson Steck");
} else {
+ if (debug) {
+ Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: CommandSender is console.");
+ }
System.out.println("[Resurrection] --- Resurrection ---");
System.out.println("[Resurrection]");
System.out.println("[Resurrection] Resurrection is a Spigot Minecraft plugin that forces players to wait a certain amount of time before respawning.");