Remove Timings

This commit is contained in:
BillyGalbreath
2025-01-12 15:44:37 -08:00
committed by granny
parent c544757d8c
commit 69b42fb1b5
7 changed files with 136 additions and 162 deletions

View File

@@ -20,12 +20,17 @@
// Paper start - Plugins do weird things to workaround normal registration
if (target.timings == null) {
target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
@@ -162,7 +_,7 @@
@@ -160,10 +_,10 @@
// Paper end
try {
try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources
- try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources
+ //try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur - Remove Timings
// 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 // Paper
+ target.execute(sender, sentCommandLabel, parsedArgs); // Purpur - ExecuteCommandEvent
} // target.timings.stopTiming(); // Spigot // Paper
+ //} // target.timings.stopTiming(); // Spigot // Paper // Purpur - Remove Timings
} catch (CommandException ex) {
server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
//target.timings.stopTiming(); // Spigot // Paper

View File

@@ -0,0 +1,12 @@
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -61,7 +_,7 @@
handler = timing;
}
- public void startTiming() { handler.startTiming(); }
- public void stopTiming() { handler.stopTiming(); }
+ public void startTiming() { /*handler.startTiming();*/ } // Purpur - Remove Timings
+ public void stopTiming() { /*handler.stopTiming();*/ } // Purpur - Remove Timings
}