sponge: Fix block place handler not checking all transactions.

This commit is contained in:
bloodshot 2019-12-23 22:56:58 -05:00
parent 53ad9e1f84
commit f1479a505f

View File

@ -811,7 +811,7 @@ public void onBlockPlace(ChangeBlockEvent.Place event) {
TileEntity tileEntity = block.getLocation().get().getTileEntity().orElse(null); TileEntity tileEntity = block.getLocation().get().getTileEntity().orElse(null);
if (tileEntity == null || !(tileEntity instanceof Chest)) { if (tileEntity == null || !(tileEntity instanceof Chest)) {
GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync(); GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return; continue;
} }
final int minClaimLevel = GDPermissionManager.getInstance().getInternalOptionValue(TypeToken.of(Integer.class), user, Options.MIN_LEVEL).intValue(); final int minClaimLevel = GDPermissionManager.getInstance().getInternalOptionValue(TypeToken.of(Integer.class), user, Options.MIN_LEVEL).intValue();
@ -823,7 +823,7 @@ public void onBlockPlace(ChangeBlockEvent.Place event) {
"max-claim-level", maxClaimLevel)); "max-claim-level", maxClaimLevel));
GriefDefenderPlugin.sendMessage(player, message); GriefDefenderPlugin.sendMessage(player, message);
GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync(); GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return; continue;
} }
int radius = activeConfig.getConfig().claim.autoChestClaimBlockRadius; int radius = activeConfig.getConfig().claim.autoChestClaimBlockRadius;
@ -846,7 +846,7 @@ public void onBlockPlace(ChangeBlockEvent.Place event) {
claimManager.addClaim(claim, true); claimManager.addClaim(claim, true);
GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().CLAIM_CHEST_CONFIRMATION); GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().CLAIM_CHEST_CONFIRMATION);
GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync(); GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return; continue;
} }
} else { } else {
Vector3i lesserBoundary = new Vector3i( Vector3i lesserBoundary = new Vector3i(
@ -879,7 +879,7 @@ public void onBlockPlace(ChangeBlockEvent.Place event) {
visualization.apply(player); visualization.apply(player);
GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync(); GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
return; continue;
} }
} }
} }