Package noppes.npcs.api.handler
Interface IAbilityHandler
-
public interface IAbilityHandlerHandler for ability management. Allows scripts to query ability types, built-in abilities, and custom ability presets.Access via API.getAbilities()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandeleteChainedAbilityByName(String name)Delete a chained ability by name.booleandeleteCustomAbilityByName(String name)Delete a custom ability preset by name.String[]getAbilityNameArray()Get all built-in ability names.IChainedAbilitygetChainedAbility(String name)Get a chained ability by name.String[]getChainedAbilityNames()Get all chained ability names.String[]getCustomAbilityNameArray()Get all custom ability preset names.String[]getTypes()Get all registered ability type IDs.booleanhasAbilityName(String name)Check if a built-in ability exists by name.booleanhasChainedAbilityName(String name)Check if a chained ability exists by name.booleanhasCustomAbilityName(String name)Check if a custom ability preset exists by name.booleanhasType(String typeId)Check if an ability type is registered.booleansaveChainedAbility(IChainedAbility chain)Save a chained ability.
-
-
-
Method Detail
-
getTypes
String[] getTypes()
Get all registered ability type IDs.- Returns:
- array of all registered ability type IDs
-
hasType
boolean hasType(String typeId)
Check if an ability type is registered.- Parameters:
typeId- the ability type ID to check- Returns:
- true if the type is registered
-
getAbilityNameArray
String[] getAbilityNameArray()
Get all built-in ability names.- Returns:
- array of all registered ability names (built-in and custom)
-
hasAbilityName
boolean hasAbilityName(String name)
Check if a built-in ability exists by name.- Parameters:
name- the ability name to check- Returns:
- true if an ability with this name exists
-
getCustomAbilityNameArray
String[] getCustomAbilityNameArray()
Get all custom ability preset names.- Returns:
- array of all custom (user-created) ability names
-
hasCustomAbilityName
boolean hasCustomAbilityName(String name)
Check if a custom ability preset exists by name.- Parameters:
name- the custom ability name to check- Returns:
- true if a custom ability with this name exists
-
deleteCustomAbilityByName
boolean deleteCustomAbilityByName(String name)
Delete a custom ability preset by name.- Parameters:
name- the custom ability name to delete- Returns:
- true if deleted successfully
-
getChainedAbilityNames
String[] getChainedAbilityNames()
Get all chained ability names.- Returns:
- array of all chained ability names
-
hasChainedAbilityName
boolean hasChainedAbilityName(String name)
Check if a chained ability exists by name.- Parameters:
name- the chained ability name to check- Returns:
- true if a chained ability with this name exists
-
deleteChainedAbilityByName
boolean deleteChainedAbilityByName(String name)
Delete a chained ability by name.- Parameters:
name- the chained ability name to delete- Returns:
- true if deleted successfully
-
getChainedAbility
IChainedAbility getChainedAbility(String name)
Get a chained ability by name.- Parameters:
name- the chained ability name- Returns:
- the chained ability, or null if not found
-
saveChainedAbility
boolean saveChainedAbility(IChainedAbility chain)
Save a chained ability. If a chain with the same name exists, it is overwritten.- Parameters:
chain- the chained ability to save- Returns:
- true if saved successfully
-
-