Added check for gamemode when disabling flight as to not disable flight for players not using factions flight but minecraft flight

This commit is contained in:
DroppingAnvil 2019-09-14 10:22:58 -05:00 committed by BuildTools
parent 8035e26af0
commit c23d19435d
1 changed files with 1 additions and 1 deletions

View File

@ -736,7 +736,7 @@ public class FactionsPlayerListener implements Listener {
}
if (me.getAutoClaimFor() != null) {
me.attemptClaim(me.getAutoClaimFor(), event.getTo(), true);
if (Conf.disableFlightOnFactionClaimChange) CmdFly.disableFlight(me);
if (Conf.disableFlightOnFactionClaimChange && event.getPlayer().getGameMode() != GameMode.CREATIVE) CmdFly.disableFlight(me);
} else if (me.isAutoSafeClaimEnabled()) {
if (!Permission.MANAGE_SAFE_ZONE.has(player)) {
me.setIsAutoSafeClaimEnabled(false);