Fixed fly no permission issue

This commit is contained in:
DroppingAnvil 2020-04-08 12:59:41 -05:00 committed by droppinganvil
parent 103c69fecf
commit 5b7f3b0f0e

View File

@ -98,7 +98,7 @@ public class CmdFly extends FCommand {
} }
public static boolean checkFly(FPlayer fme, Player me, Faction toFac) { public static boolean checkFly(FPlayer fme, Player me, Faction toFac) {
if ((Conf.denyFlightIfInNoClaimingWorld && !Conf.worldsNoClaiming.isEmpty() && Conf.worldsNoClaiming.stream().anyMatch(me.getWorld().getName()::equalsIgnoreCase)) || me.hasPermission(Permission.FLY_FLY.node)) if ((Conf.denyFlightIfInNoClaimingWorld && !Conf.worldsNoClaiming.isEmpty() && Conf.worldsNoClaiming.stream().anyMatch(me.getWorld().getName()::equalsIgnoreCase)) || !me.hasPermission(Permission.FLY_FLY.node))
return false; return false;
if (toFac.getAccess(fme, PermissableAction.FLY) == Access.ALLOW) return true; if (toFac.getAccess(fme, PermissableAction.FLY) == Access.ALLOW) return true;
if (fme.getFaction().isWilderness()) return false; if (fme.getFaction().isWilderness()) return false;