mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-01 04:10:54 +02:00
Protect detector/powered rails
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user