mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-16 21:05:07 +00:00
Ability Push
This commit is contained in:
1 parent
ed5640d238
commit
3ac76848d3
7 files changed
+448
-2
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package noppes.npcs.api.ability;
|
||||
|
||||
/**
|
||||
* Handler for ability registration and creation.
|
||||
* Use this to register custom ability types from external mods.
|
||||
*/
|
||||
public interface IAbilityHandler {
|
||||
|
||||
/**
|
||||
* Register a custom ability type.
|
||||
* Call during FMLInitializationEvent.
|
||||
*
|
||||
* @param typeId The unique type ID (e.g., "mymod:custom_ability")
|
||||
* @param abilityClass The class that implements the ability
|
||||
*/
|
||||
void registerType(String typeId, Class<? extends IAbility> abilityClass);
|
||||
|
||||
/**
|
||||
* Check if an ability type is registered.
|
||||
*/
|
||||
boolean hasType(String typeId);
|
||||
|
||||
/**
|
||||
* Get all registered ability type IDs.
|
||||
*/
|
||||
String[] getTypes();
|
||||
|
||||
/**
|
||||
* Create a new ability of the given type.
|
||||
* Returns null if the type is not registered.
|
||||
*/
|
||||
IAbility create(String typeId);
|
||||
}
|
||||
Reference in new issue
Block a user