9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2025-12-27 19:09:13 +00:00

Added ecoarmor.noflydisable permission

This commit is contained in:
Auxilor
2021-04-12 22:06:11 +01:00
parent c58979107d
commit be0e1d23e7
2 changed files with 8 additions and 0 deletions

View File

@@ -17,6 +17,10 @@ public class Flight extends Effect<Boolean> {
@Override
protected void onDisable(@NotNull final Player player) {
if (player.hasPermission("ecoarmor.noflydisable")) {
return;
}
if (player.getGameMode() == GameMode.SURVIVAL || player.getGameMode() == GameMode.ADVENTURE) {
player.setAllowFlight(false);
}

View File

@@ -37,6 +37,7 @@ permissions:
children:
ecoarmor.reload: true
ecoarmor.give: true
ecoarmor.noflydisable: true
ecoarmor.reload:
description: Allows reloading the config
@@ -44,3 +45,6 @@ permissions:
ecoarmor.give:
description: Allows the use of /eagive
default: op
ecoarmor.noflydisable:
description: Prevents losing fly.
default: op