Vanish Check for Factions Fly
This commit is contained in:
parent
97b6c75ffa
commit
065077e241
@ -572,7 +572,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
|
|
||||||
public void checkCanFly(FPlayer me) {
|
public void checkCanFly(FPlayer me) {
|
||||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) return;
|
if (!FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) return;
|
||||||
if (me.isFlying() && (!me.canFlyAtLocation() || me.checkIfNearbyEnemies())) {
|
if (me.isFlying() && !me.isVanished() && (!me.canFlyAtLocation() || me.checkIfNearbyEnemies())) {
|
||||||
me.setFFlying(false, false);
|
me.setFFlying(false, false);
|
||||||
me.msg(TL.COMMAND_FLY_NO_ACCESS, Board.getInstance().getFactionAt(me.getLastStoodAt()).getTag());
|
me.msg(TL.COMMAND_FLY_NO_ACCESS, Board.getInstance().getFactionAt(me.getLastStoodAt()).getTag());
|
||||||
return;
|
return;
|
||||||
|
@ -78,7 +78,7 @@ public class UtilFly {
|
|||||||
|| (factionTo.isWilderness() && !me.canflyinWilderness()) || (factionTo.isWarZone() && !me.canflyinWarzone())
|
|| (factionTo.isWilderness() && !me.canflyinWilderness()) || (factionTo.isWarZone() && !me.canflyinWarzone())
|
||||||
|| (factionTo.isSafeZone() && !me.canflyinSafezone()) || (relationTo == Relation.ENEMY && !me.canflyinEnemy())
|
|| (factionTo.isSafeZone() && !me.canflyinSafezone()) || (relationTo == Relation.ENEMY && !me.canflyinEnemy())
|
||||||
|| (relationTo == Relation.ALLY && !me.canflyinAlly()) || (relationTo == Relation.TRUCE && !me.canflyinTruce())
|
|| (relationTo == Relation.ALLY && !me.canflyinAlly()) || (relationTo == Relation.TRUCE && !me.canflyinTruce())
|
||||||
|| (relationTo == Relation.NEUTRAL && !me.canflyinNeutral())) {
|
|| (relationTo == Relation.NEUTRAL && !me.canflyinNeutral()) || !me.isVanished()) {
|
||||||
UtilFly.setFly(me, false, false, false);
|
UtilFly.setFly(me, false, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user