mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-05 18:29:34 +01:00
Reverted debug command.
This commit is contained in:
parent
f053f0546b
commit
b93822502e
@ -23,7 +23,7 @@ public class DebugCommand extends MultiverseCommand {
|
||||
public DebugCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.setName("Turn Debug on/off?");
|
||||
this.setCommandUsage("/mv debug" + ChatColor.GOLD + " [1|2|3|off|-1]");
|
||||
this.setCommandUsage("/mv debug" + ChatColor.GOLD + " [1|2|3|off|silent]");
|
||||
this.setArgRange(0, 1);
|
||||
this.addKey("mv debug");
|
||||
this.addKey("mv d");
|
||||
@ -40,13 +40,13 @@ public class DebugCommand extends MultiverseCommand {
|
||||
} else {
|
||||
try {
|
||||
int debugLevel = Integer.parseInt(args.get(0));
|
||||
if (debugLevel > 3 || debugLevel < -1) {
|
||||
if (debugLevel > 3 || debugLevel < 0) {
|
||||
throw new NumberFormatException();
|
||||
}
|
||||
plugin.getMVConfig().setGlobalDebug(debugLevel);
|
||||
} catch (NumberFormatException e) {
|
||||
sender.sendMessage(ChatColor.RED + "Error" + ChatColor.WHITE
|
||||
+ " setting debug level. Please use a number 0-3 or -1 " + ChatColor.AQUA + "(3 being many many messages! -1 disables common messages!)");
|
||||
+ " setting debug level. Please use a number 0-3 " + ChatColor.AQUA + "(3 being many many messages!)");
|
||||
}
|
||||
}
|
||||
plugin.saveMVConfigs();
|
||||
@ -58,11 +58,9 @@ public class DebugCommand extends MultiverseCommand {
|
||||
final int debugLevel = plugin.getMVConfig().getGlobalDebug();
|
||||
if (debugLevel == 0) {
|
||||
sender.sendMessage("Multiverse Debug mode is " + ChatColor.RED + "OFF");
|
||||
} else if (debugLevel > 0) {
|
||||
} else {
|
||||
sender.sendMessage("Multiverse Debug mode is " + ChatColor.GREEN + debugLevel);
|
||||
this.plugin.log(Level.FINE, "Multiverse Debug ENABLED");
|
||||
} else {
|
||||
sender.sendMessage("Multiverse Debug mode is" + ChatColor.GRAY + " disabling common startup messages!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user