summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-06-23 15:57:52 +0200
committersnowleo <schneeleo@gmail.com>2011-06-23 15:57:52 +0200
commit198b205d83cc492bd2a0e0e656ae8a1d19814340 (patch)
tree72b73dfb2c13ae789cddff742c1d56ccaf30ad8b
parentb9e56d100c00390c180e68dcea52f1eda7b90d82 (diff)
downloadEssentials-198b205d83cc492bd2a0e0e656ae8a1d19814340.tar
Essentials-198b205d83cc492bd2a0e0e656ae8a1d19814340.tar.gz
Essentials-198b205d83cc492bd2a0e0e656ae8a1d19814340.tar.lz
Essentials-198b205d83cc492bd2a0e0e656ae8a1d19814340.tar.xz
Essentials-198b205d83cc492bd2a0e0e656ae8a1d19814340.zip
Fix unbreakable blocks
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java17
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;
}
}
}