minor cleanup of hanging explosion protection code
This commit is contained in:
parent
a71e1bf8b2
commit
8288cfc44a
@ -505,44 +505,30 @@ public class FactionsEntityListener implements Listener
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
(faction.isNone() && Conf.wildernessBlockCreepers && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName()))
|
(
|
||||||
||
|
faction.isNone()
|
||||||
(faction.isNormal() && (online ? Conf.territoryBlockCreepers : Conf.territoryBlockCreepersWhenOffline))
|
&& !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName())
|
||||||
||
|
&& (Conf.wildernessBlockCreepers || Conf.wildernessBlockFireballs || Conf.wildernessBlockTNT)
|
||||||
(faction.isWarZone() && Conf.warZoneBlockCreepers)
|
)
|
||||||
||
|
||
|
||||||
faction.isSafeZone()
|
(
|
||||||
|
faction.isNormal()
|
||||||
|
&&
|
||||||
|
( online
|
||||||
|
? (Conf.territoryBlockCreepers || Conf.territoryBlockFireballs || Conf.territoryBlockTNT)
|
||||||
|
: (Conf.territoryBlockCreepersWhenOffline || Conf.territoryBlockFireballsWhenOffline || Conf.territoryBlockTNTWhenOffline)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
||
|
||||||
|
(
|
||||||
|
faction.isWarZone()
|
||||||
|
&& (Conf.warZoneBlockCreepers || Conf.warZoneBlockFireballs || Conf.warZoneBlockTNT)
|
||||||
|
)
|
||||||
|
||
|
||||||
|
faction.isSafeZone()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// creeper which needs prevention
|
// explosion which needs prevention
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
else if
|
|
||||||
(
|
|
||||||
(faction.isNone() && Conf.wildernessBlockFireballs && !Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName()))
|
|
||||||
||
|
|
||||||
(faction.isNormal() && (online ? Conf.territoryBlockFireballs : Conf.territoryBlockFireballsWhenOffline))
|
|
||||||
||
|
|
||||||
(faction.isWarZone() && Conf.warZoneBlockFireballs)
|
|
||||||
||
|
|
||||||
faction.isSafeZone()
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// ghast fireball which needs prevention
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
else if
|
|
||||||
(
|
|
||||||
(faction.isNone() && Conf.wildernessBlockTNT && ! Conf.worldsNoWildernessProtection.contains(loc.getWorld().getName()))
|
|
||||||
||
|
|
||||||
(faction.isNormal() && ( online ? Conf.territoryBlockTNT : Conf.territoryBlockTNTWhenOffline ))
|
|
||||||
||
|
|
||||||
(faction.isWarZone() && Conf.warZoneBlockTNT)
|
|
||||||
||
|
|
||||||
(faction.isSafeZone() && Conf.safeZoneBlockTNT)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// TNT which needs prevention
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user