diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-17 17:06:06 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-17 17:06:06 +0100 |
commit | 39a4a363f667b511a4538d5dabee697600b22478 (patch) | |
tree | 2c2db498753157b6239031f4e935f540e72961e0 /EssentialsProtect | |
parent | 54389e2f9c36d0e9186cc5d8a36fec5f94859484 (diff) | |
download | Essentials-39a4a363f667b511a4538d5dabee697600b22478.tar Essentials-39a4a363f667b511a4538d5dabee697600b22478.tar.gz Essentials-39a4a363f667b511a4538d5dabee697600b22478.tar.lz Essentials-39a4a363f667b511a4538d5dabee697600b22478.tar.xz Essentials-39a4a363f667b511a4538d5dabee697600b22478.zip |
General fix against overwriting already existing protections
Diffstat (limited to 'EssentialsProtect')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index 7f96750e4..db574fe22 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -75,7 +75,8 @@ public class EssentialsProtectBlockListener extends BlockListener && user.isAuthorized("essentials.protect")) { protect.add(blockPlaced); - if (prot.getSettingBool(ProtectConfig.protect_below_rails)) + if (prot.getSettingBool(ProtectConfig.protect_below_rails) + && !prot.getStorage().isProtected(blockPlaced.getRelative(BlockFace.DOWN), user.getName())) { protect.add(blockPlaced.getRelative(BlockFace.DOWN)); } @@ -87,7 +88,8 @@ public class EssentialsProtectBlockListener extends BlockListener protect.add(blockPlaced); if (prot.getSettingBool(ProtectConfig.protect_against_signs) && event.getBlockAgainst().getType() != Material.SIGN_POST - && event.getBlockAgainst().getType() != Material.WALL_SIGN) + && event.getBlockAgainst().getType() != Material.WALL_SIGN + && !prot.getStorage().isProtected(event.getBlockAgainst(), user.getName())) { protect.add(event.getBlockAgainst()); } |