mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 16:54:30 +00:00
Fixed the check that prevented built-in types from showing up in NPC Abilities
This commit is contained in:
1 parent
7ed68b7efe
commit
55149ab5d1
2 files changed
+30
-2
No files matched your search
@@ -497,6 +497,33 @@ public class AbilityController implements IAbilityHandler {
|
||||
return abilityTypes.containsKey(typeId);
|
||||
}
|
||||
|
||||
public boolean isAllowedByPlayer(String typeId) {
|
||||
if (abilityTypes.containsKey(typeId)) {
|
||||
Ability temp = abilityTypes.get(typeId).get();
|
||||
return temp.getAllowedBy() == UserType.PLAYER_ONLY;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isAllowedByNPC(String typeId) {
|
||||
if (abilityTypes.containsKey(typeId)) {
|
||||
Ability temp = abilityTypes.get(typeId).get();
|
||||
return temp.getAllowedBy() == UserType.NPC_ONLY;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isAllowedByBoth(String typeId) {
|
||||
if (abilityTypes.containsKey(typeId)) {
|
||||
Ability temp = abilityTypes.get(typeId).get();
|
||||
return temp.getAllowedBy() == UserType.BOTH;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAbilityNameArray() {
|
||||
return builtAbilities.keySet().toArray(new String[0]);
|
||||
|
||||
Reference in new issue
Block a user