Update from upstream SpigotMC
Fix Corrupted Trapped Chests SpigotMC/Spigot@08de30ca3e Don't time async events SpigotMC/Spigot@c3a9e71da3
This commit is contained in:
@@ -272,9 +272,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
if (!eventClass.isAssignableFrom(event.getClass())) {
|
||||
return;
|
||||
}
|
||||
+ timings.startTiming(); // Spigot
|
||||
+ // Spigot start
|
||||
+ boolean isAsync = event.isAsynchronous();
|
||||
+ if (!isAsync) timings.startTiming();
|
||||
method.invoke(listener, event);
|
||||
+ timings.stopTiming(); // Spigot
|
||||
+ if (!isAsync) timings.stopTiming();
|
||||
+ // Spigot end
|
||||
} catch (InvocationTargetException ex) {
|
||||
throw new EventException(ex.getCause());
|
||||
} catch (Throwable t) {
|
||||
|
||||
Reference in New Issue
Block a user