mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Add ability to check if any ability is enabled.
This commit is contained in:
parent
61205989cc
commit
4b93dede33
@ -34,4 +34,14 @@ public class AbilityAPI {
|
||||
public static boolean treeFellerEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.TREE_FELLER);
|
||||
}
|
||||
|
||||
public static boolean isAnyAbilityEnabled(Player player) {
|
||||
for (AbilityType ability : AbilityType.values()) {
|
||||
if (Users.getProfile(player).getAbilityMode(ability)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user