From 4d59f90543d93cd047ac55ee62cca4ba040589d0 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Tue, 2 Dec 2014 14:28:59 -0800 Subject: [PATCH] Protected new types of doors and gates. --- .../GriefPrevention/PlayerEventHandler.java | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java index 24d4880..f17ecb6 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java @@ -1167,10 +1167,28 @@ class PlayerEventHandler implements Listener //otherwise apply rules for doors and beds, if configured that way else if( clickedBlock != null && - (GriefPrevention.instance.config_claims_lockWoodenDoors && clickedBlockType == Material.WOODEN_DOOR) || - (GriefPrevention.instance.config_claims_preventButtonsSwitches && clickedBlockType == Material.BED_BLOCK) || - (GriefPrevention.instance.config_claims_lockTrapDoors && clickedBlockType == Material.TRAP_DOOR) || - (GriefPrevention.instance.config_claims_lockFenceGates && clickedBlockType == Material.FENCE_GATE)) + + (GriefPrevention.instance.config_claims_lockWoodenDoors && ( + clickedBlockType == Material.WOODEN_DOOR || + clickedBlockType == Material.ACACIA_DOOR || + clickedBlockType == Material.BIRCH_DOOR || + clickedBlockType == Material.JUNGLE_DOOR || + clickedBlockType == Material.SPRUCE_DOOR || + clickedBlockType == Material.DARK_OAK_DOOR)) || + + (GriefPrevention.instance.config_claims_preventButtonsSwitches && clickedBlockType == Material.BED_BLOCK) || + + (GriefPrevention.instance.config_claims_lockTrapDoors && ( + clickedBlockType == Material.TRAP_DOOR || + clickedBlockType == Material.IRON_TRAPDOOR)) || + + (GriefPrevention.instance.config_claims_lockFenceGates && ( + clickedBlockType == Material.FENCE_GATE || + clickedBlockType == Material.ACACIA_FENCE_GATE || + clickedBlockType == Material.BIRCH_FENCE_GATE || + clickedBlockType == Material.JUNGLE_FENCE_GATE || + clickedBlockType == Material.SPRUCE_FENCE_GATE || + clickedBlockType == Material.DARK_OAK_FENCE_GATE))) { if(playerData == null) playerData = this.dataStore.getPlayerData(player.getUniqueId()); Claim claim = this.dataStore.getClaimAt(clickedBlock.getLocation(), false, playerData.lastClaim); @@ -1957,7 +1975,6 @@ class PlayerEventHandler implements Listener { case WOOD_BUTTON: case STONE_BUTTON: - case WOOD_DOOR: case LEVER: case DIODE_BLOCK_ON: //redstone repeater case DIODE_BLOCK_OFF: