Update from upstream SpigotMC

Fix Corrupted Trapped Chests SpigotMC/Spigot@08de30ca3e
Don't time async events SpigotMC/Spigot@c3a9e71da3
This commit is contained in:
Zach Brown
2014-08-15 14:35:58 -05:00
parent 8567c11cb9
commit a243d1abe5
2 changed files with 29 additions and 2 deletions

View File

@@ -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) {