Did #29, probably #38 and #26 over the past few commits.

This commit is contained in:
Norbi Peti 2016-07-01 00:16:14 +02:00
parent 7a39a0bc7d
commit 1e95f3773a
2 changed files with 30 additions and 0 deletions

Binary file not shown.

View file

@ -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);
}
}