Files
Tenet/patches/org/bukkit/command/SimpleCommandMap.java.patch
2020-10-30 11:35:16 +08:00

28 lines
1.1 KiB
Diff

--- ../src-base/minecraft/org/bukkit/command/SimpleCommandMap.java
+++ ../src-work/minecraft/org/bukkit/command/SimpleCommandMap.java
@@ -167,7 +167,7 @@
if (args.length == 0) {
return false;
}
-
+
String sentCommandLabel = args[0].toLowerCase();
Command target = getCommand(sentCommandLabel);
@@ -176,11 +176,15 @@
}
try {
+ target.timings.startTiming(); // Spigot
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
target.execute(sender, sentCommandLabel, Arrays_copyOfRange(args, 1, args.length));
+ target.timings.stopTiming(); // Spigot
} catch (CommandException ex) {
+ target.timings.stopTiming(); // Spigot
throw ex;
} catch (Throwable ex) {
+ target.timings.stopTiming(); // Spigot
throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex);
}