diff options
author | snowleo <schneeleo@gmail.com> | 2011-06-23 15:57:52 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-06-23 15:57:52 +0200 |
commit | 60b89c6e3ccb96c00803268761e8ee9d9d3a6205 (patch) | |
tree | aa10cb9cd4bf931be850cd60b2d469450502de92 /EssentialsProtect | |
parent | 8e6cd8901790fb543a8a80dcefb4e139e0004a07 (diff) | |
download | Essentials-60b89c6e3ccb96c00803268761e8ee9d9d3a6205.tar Essentials-60b89c6e3ccb96c00803268761e8ee9d9d3a6205.tar.gz Essentials-60b89c6e3ccb96c00803268761e8ee9d9d3a6205.tar.lz Essentials-60b89c6e3ccb96c00803268761e8ee9d9d3a6205.tar.xz Essentials-60b89c6e3ccb96c00803268761e8ee9d9d3a6205.zip |
Fix unbreakable blocks
Diffstat (limited to 'EssentialsProtect')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index 39e912fbe..8bc26f67e 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -267,18 +267,21 @@ public class EssentialsProtectBlockListener extends BlockListener else { for (BlockFace blockFace : faces) - { - final Block against = block.getFace(blockFace); - storage.unprotectBlock(against); - } + { + final Block against = block.getFace(blockFace); + storage.unprotectBlock(against); } - return; + } } else { final boolean isProtected = storage.isProtected(block, user.getName()); - if (!isProtected) + if (isProtected) + { + event.setCancelled(true); + } + else { if (type == Material.WALL_SIGN || type == Material.SIGN_POST || type == Material.RAILS) { @@ -306,8 +309,6 @@ public class EssentialsProtectBlockListener extends BlockListener } } } - event.setCancelled(true); - return; } } } |