diff options
author | ementalo <ementalo@gmx.co.uk> | 2011-06-11 16:05:14 +0100 |
---|---|---|
committer | ementalo <ementalo@gmx.co.uk> | 2011-06-11 16:05:14 +0100 |
commit | 01f69b3f2b0b7cd471b5af6e0d04e573f480cee5 (patch) | |
tree | f590613d2e40506b8e0096bd55e2db10f609b938 /EssentialsProtect/src/com/earth2me/essentials/protect | |
parent | 26c9b34744760ae8bcaa311f7d55c84e888669db (diff) | |
download | Essentials-01f69b3f2b0b7cd471b5af6e0d04e573f480cee5.tar Essentials-01f69b3f2b0b7cd471b5af6e0d04e573f480cee5.tar.gz Essentials-01f69b3f2b0b7cd471b5af6e0d04e573f480cee5.tar.lz Essentials-01f69b3f2b0b7cd471b5af6e0d04e573f480cee5.tar.xz Essentials-01f69b3f2b0b7cd471b5af6e0d04e573f480cee5.zip |
Protect: Remove protection when attached block is destroyed
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials/protect')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index 56f175897..39e912fbe 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -208,7 +208,10 @@ public class EssentialsProtectBlockListener extends BlockListener BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, - BlockFace.WEST + BlockFace.WEST, + BlockFace.UP, + BlockFace.DOWN, + BlockFace.SELF }; @Override @@ -263,8 +266,12 @@ public class EssentialsProtectBlockListener extends BlockListener } else { - storage.unprotectBlock(block); - } + for (BlockFace blockFace : faces) + { + final Block against = block.getFace(blockFace); + storage.unprotectBlock(against); + } + } return; } else @@ -292,7 +299,11 @@ public class EssentialsProtectBlockListener extends BlockListener } else { - storage.unprotectBlock(block); + for (BlockFace blockFace : faces) + { + final Block against = block.getFace(blockFace); + storage.unprotectBlock(against); + } } } event.setCancelled(true); |