From 3f336794244b8b8674f257dd8ecd9cf7eb9833e0 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Sat, 13 Dec 2014 11:39:53 -0800 Subject: [PATCH] Removed some limitations on hoppers and mine carts. No longer needed - building at the bottom of a claim now extends the claim downward, so no important blocks (like chests) will be thievable by hoppers or hopper mine carts except in extremely rare, not-manufacturable situations. --- .../GriefPrevention/BlockEventHandler.java | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index f77be3d..9c57a2b 100644 --- a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -176,40 +176,7 @@ public class BlockEventHandler implements Listener { playerData.lastClaim = claim; - //FEATURE: prevent theft from container using a hopper when the container is at the very bottom of a land claim - - if(block.getType() == Material.HOPPER) - { - //is the above block inside the land claim? - Block aboveBlock = block.getRelative(BlockFace.UP); - if(claim.contains(aboveBlock.getLocation(), false, false)) - { - //then the player needs container trust to place the hopper - String failureMessage = claim.allowContainers(player); - if(failureMessage != null) - { - placeEvent.setCancelled(true); - GriefPrevention.sendMessage(player, TextMode.Err, failureMessage); - return; - } - } - } - - //rails can't be placed ANYWHERE under a claim, because they could be pushed up to the - //target container using pistons - if(block.getType().name().contains("RAIL")) - { - //then the player needs container trust to place the hopper - String failureMessage = claim.allowContainers(player); - if(failureMessage != null) - { - placeEvent.setCancelled(true); - GriefPrevention.sendMessage(player, TextMode.Err, failureMessage); - return; - } - } - - //warn about TNT not destroying claimed blocks + //warn about TNT not destroying claimed blocks if(block.getType() == Material.TNT && !claim.areExplosivesAllowed) { GriefPrevention.sendMessage(player, TextMode.Warn, Messages.NoTNTDamageClaims);