parent
7a39a0bc7d
commit
1e95f3773a
2 changed files with 30 additions and 0 deletions
Binary file not shown.
|
@ -0,0 +1,30 @@
|
|||
package io.github.norbipeti.thebuttonmcchat.commands.ucmds.admin;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
public class DebugCommand extends AdminCommandBase {
|
||||
private static boolean DebugMode = false;
|
||||
|
||||
@Override
|
||||
public String[] GetHelpText(String alias) {
|
||||
return new String[] { "§6---- Debug mode ----",
|
||||
"Toggles debug mode, which prints debug messages to the console." };
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetAdminCommandPath() {
|
||||
return "debug";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||
sender.sendMessage("§eDebug mode "
|
||||
+ ((DebugMode = !DebugMode) ? "§aenabled." : "§cdisabled."));
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void SendDebugMessage(String message) {
|
||||
if (DebugMode)
|
||||
System.out.println(message);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue