mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Protect detector/powered rails
This commit is contained in:
parent
65be2dba99
commit
d3302dea00
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue