Fix timing corruption in onExplosionPrimeEvent. Fixes #24

This commit is contained in:
bloodshot 2019-08-25 17:28:27 -04:00
parent d6f214db45
commit 14c087c950

View File

@ -185,6 +185,7 @@ public void onExplosionPrimeEvent(ExplosionPrimeEvent event) {
final GDClaimManager claimManager = GriefDefenderPlugin.getInstance().dataStore.getClaimWorldManager(location.getWorld().getUID()); final GDClaimManager claimManager = GriefDefenderPlugin.getInstance().dataStore.getClaimWorldManager(location.getWorld().getUID());
final Set<Claim> surroundingClaims = claimManager.findOverlappingClaims(radiusClaim); final Set<Claim> surroundingClaims = claimManager.findOverlappingClaims(radiusClaim);
if (surroundingClaims.size() == 0) { if (surroundingClaims.size() == 0) {
GDTimings.ENTITY_EXPLOSION_PRE_EVENT.stopTiming();
return; return;
} }
for (Claim claim : surroundingClaims) { for (Claim claim : surroundingClaims) {
@ -197,6 +198,7 @@ public void onExplosionPrimeEvent(ExplosionPrimeEvent event) {
break; break;
} }
} }
GDTimings.ENTITY_EXPLOSION_PRE_EVENT.stopTiming();
} }
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)