From b72d0e100f9d4df812340333e5bd38b30f7dd501 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Tue, 30 Sep 2014 18:34:34 -0700 Subject: [PATCH] Stopped extending claims just for breaks. Claims still extend on build. This saves writes to secondary storage for better performance. --- .../GriefPrevention/BlockEventHandler.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index 87b37a4..943126a 100644 --- a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -180,17 +180,6 @@ public class BlockEventHandler implements Listener PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId()); Claim claim = this.dataStore.getClaimAt(block.getLocation(), true, playerData.lastClaim); - //if there's a claim here - if(claim != null) - { - //if breaking UNDER the claim and the player has permission to build in the claim - if(block.getY() < claim.lesserBoundaryCorner.getBlockY() && claim.allowBuild(player) == null) - { - //extend the claim downward beyond the breakage point - this.dataStore.extendClaim(claim, claim.getLesserBoundaryCorner().getBlockY() - GriefPrevention.instance.config_claims_claimsExtendIntoGroundDistance); - } - } - //FEATURE: automatically clean up hanging treetops //if it's a log if(block.getType() == Material.LOG && GriefPrevention.instance.config_trees_removeFloatingTreetops) @@ -320,7 +309,7 @@ public class BlockEventHandler implements Listener } //if the player has permission for the claim and he's placing UNDER the claim - if(block.getY() < claim.lesserBoundaryCorner.getBlockY() && claim.allowBuild(player) == null) + if(block.getY() <= claim.lesserBoundaryCorner.getBlockY() && claim.allowBuild(player) == null) { //extend the claim downward this.dataStore.extendClaim(claim, claim.getLesserBoundaryCorner().getBlockY() - GriefPrevention.instance.config_claims_claimsExtendIntoGroundDistance);