mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Added Ability API
This commit is contained in:
parent
eae665c1c5
commit
2559ea61d8
@ -10,6 +10,7 @@ Key:
|
||||
Version 1.3.10-dev
|
||||
+ Added permission node for Iron Grip ability (mcmmo.ability.unarmed.irongrip)
|
||||
+ Added ability for custom blocks to drop a range of items.
|
||||
+ Added Ability API functions
|
||||
= Fixed players never being removed from memory (memory leak)
|
||||
= Fixed admin chat being seen by everyone
|
||||
|
||||
|
37
src/main/java/com/gmail/nossr50/api/AbilityAPI.java
Normal file
37
src/main/java/com/gmail/nossr50/api/AbilityAPI.java
Normal file
@ -0,0 +1,37 @@
|
||||
package com.gmail.nossr50.api;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
import com.gmail.nossr50.util.Users;
|
||||
|
||||
public class AbilityAPI {
|
||||
|
||||
public static boolean berserkEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.BERSERK);
|
||||
}
|
||||
|
||||
public static boolean gigaDrillBreakerEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.GIGA_DRILL_BREAKER);
|
||||
}
|
||||
|
||||
public static boolean greenTerraEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.GREEN_TERRA);
|
||||
}
|
||||
|
||||
public static boolean serratedStrikesEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.SERRATED_STRIKES);
|
||||
}
|
||||
|
||||
public static boolean skullSplitterEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.SKULL_SPLIITER);
|
||||
}
|
||||
|
||||
public static boolean superBreakerEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.SUPER_BREAKER);
|
||||
}
|
||||
|
||||
public static boolean treeFellerEnabled(Player player) {
|
||||
return Users.getProfile(player).getAbilityMode(AbilityType.TREE_FELLER);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user