mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Protect detector/powered rails
This commit is contained in:
parent
65be2dba99
commit
d3302dea00
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user