Add ability to check if any ability is enabled.

This commit is contained in:
GJ 2012-06-25 10:35:47 -04:00
parent 61205989cc
commit 4b93dede33

View File

@ -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;
}
}