summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoctorDark <doctordark11@gmail.com>2014-12-07 14:49:32 +0000
committermd_5 <git@md-5.net>2014-12-18 21:16:52 +1100
commit0af5d198f5c72f5517f37a36a8ab2bdf2fe5418d (patch)
treee12df8425524d44a4fbe8ff63e59ed0e4a27945b
parent212f508550a4060507bb20ae8d6f2881772cbb90 (diff)
downloadbukkit-0af5d198f5c72f5517f37a36a8ab2bdf2fe5418d.tar
bukkit-0af5d198f5c72f5517f37a36a8ab2bdf2fe5418d.tar.gz
bukkit-0af5d198f5c72f5517f37a36a8ab2bdf2fe5418d.tar.lz
bukkit-0af5d198f5c72f5517f37a36a8ab2bdf2fe5418d.tar.xz
bukkit-0af5d198f5c72f5517f37a36a8ab2bdf2fe5418d.zip
Fix case sensitive arguments, show usage message if no arguments found for the timings command
-rw-r--r--src/main/java/org/bukkit/command/defaults/TimingsCommand.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
index 05cfcb01..a39ea5dd 100644
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
@@ -41,8 +41,8 @@ public class TimingsCommand extends BukkitCommand {
return true;
}
- boolean separate = "separate".equals(args[0]);
- if ("reset".equals(args[0])) {
+ boolean separate = "separate".equalsIgnoreCase(args[0]);
+ if ("reset".equalsIgnoreCase(args[0])) {
for (HandlerList handlerList : HandlerList.getHandlerLists()) {
for (RegisteredListener listener : handlerList.getRegisteredListeners()) {
if (listener instanceof TimedRegisteredListener) {
@@ -51,7 +51,7 @@ public class TimingsCommand extends BukkitCommand {
}
}
sender.sendMessage("Timings reset");
- } else if ("merged".equals(args[0]) || separate) {
+ } else if ("merged".equalsIgnoreCase(args[0]) || separate) {
int index = 0;
int pluginIdx = 0;
@@ -103,6 +103,9 @@ public class TimingsCommand extends BukkitCommand {
fileNames.close();
}
}
+ } else {
+ sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
+ return false;
}
return true;
}