diff --git a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 12af8b4c..33d35033 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -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; diff --git a/src/main/java/com/massivecraft/factions/util/UtilFly.java b/src/main/java/com/massivecraft/factions/util/UtilFly.java index a0898e14..b5ab004f 100644 --- a/src/main/java/com/massivecraft/factions/util/UtilFly.java +++ b/src/main/java/com/massivecraft/factions/util/UtilFly.java @@ -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); } }