mirror of
https://github.com/essentials/Essentials.git
synced 2025-07-31 20:00:47 +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())
|
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))
|
&& prot.getSettingBool(ProtectConfig.protect_rails))
|
||||||
{
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Reference in New Issue
Block a user