mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
Fix case sensitive arguments, show usage message if no arguments found for the timings command
By: DoctorDark <doctordark11@gmail.com>
This commit is contained in:
parent
e792eb8747
commit
52f6aff4e1
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue