mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-16 17:44:47 +00:00
Player Abilities
This commit is contained in:
1 parent
06c9daf81b
commit
db6a68e430
7 files changed
+261
-28
No files matched your search
@@ -30,4 +30,22 @@ public interface IAbilityHandler {
|
||||
* Returns null if the type is not registered.
|
||||
*/
|
||||
IAbility create(String typeId);
|
||||
|
||||
/**
|
||||
* Register a pre-configured ability by name.
|
||||
* These abilities are resolved by name and can be referenced by NPCs and players.
|
||||
* Call during FMLInitializationEvent.
|
||||
*
|
||||
* @param name The unique name for the ability
|
||||
* @param ability The ability instance
|
||||
*/
|
||||
void registerAbility(String name, IAbility ability);
|
||||
|
||||
/**
|
||||
* Check if a registered ability exists by name.
|
||||
*
|
||||
* @param name The ability name
|
||||
* @return true if the ability exists
|
||||
*/
|
||||
boolean hasAbility(String name);
|
||||
}
|
||||
Reference in new issue
Block a user