Vanish Check for Factions Fly

This commit is contained in:
Driftay 2020-04-04 07:53:52 -04:00
parent 97b6c75ffa
commit 065077e241
2 changed files with 2 additions and 2 deletions

View File

@ -572,7 +572,7 @@ public class FactionsPlayerListener implements Listener {
public void checkCanFly(FPlayer me) {
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.msg(TL.COMMAND_FLY_NO_ACCESS, Board.getInstance().getFactionAt(me.getLastStoodAt()).getTag());
return;

View File

@ -78,7 +78,7 @@ public class UtilFly {
|| (factionTo.isWilderness() && !me.canflyinWilderness()) || (factionTo.isWarZone() && !me.canflyinWarzone())
|| (factionTo.isSafeZone() && !me.canflyinSafezone()) || (relationTo == Relation.ENEMY && !me.canflyinEnemy())
|| (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);
}
}