summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me/essentials
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-08-27 17:11:15 +0200
committersnowleo <schneeleo@gmail.com>2011-08-27 17:11:15 +0200
commitf76afa66a256f2e01ad6355160fe7e64cab4a806 (patch)
tree40e63299ace772b096ce0bdbf10b89b08f85ba00 /EssentialsProtect/src/com/earth2me/essentials
parent12bf86baac5be26dc1e53b6b1a3ebbf9862b617d (diff)
downloadEssentials-f76afa66a256f2e01ad6355160fe7e64cab4a806.tar
Essentials-f76afa66a256f2e01ad6355160fe7e64cab4a806.tar.gz
Essentials-f76afa66a256f2e01ad6355160fe7e64cab4a806.tar.lz
Essentials-f76afa66a256f2e01ad6355160fe7e64cab4a806.tar.xz
Essentials-f76afa66a256f2e01ad6355160fe7e64cab4a806.zip
Protect detector/powered rails
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
index d96da20a7..8dd3335f5 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
@@ -263,7 +263,12 @@ public class EssentialsProtectEntityListener extends EntityListener
for (Block block : event.blockList())
{
- if ((block.getType() == Material.RAILS || block.getRelative(BlockFace.UP).getType() == Material.RAILS)
+ if ((block.getRelative(BlockFace.UP).getType() == Material.RAILS
+ || block.getType() == Material.RAILS
+ || block.getRelative(BlockFace.UP).getType() == Material.POWERED_RAIL
+ || block.getType() == Material.POWERED_RAIL
+ || block.getRelative(BlockFace.UP).getType() == Material.DETECTOR_RAIL
+ || block.getType() == Material.DETECTOR_RAIL)
&& prot.getSettingBool(ProtectConfig.protect_rails))
{
event.setCancelled(true);