mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-19 10:49:13 +00:00
A lot of GOOD API DOCUMENTATION
This commit is contained in:
1 parent
a6c55ca331
commit
319e774518
131 files changed
+3363
-175
No files matched your search
@@ -8,54 +8,78 @@ public interface IDataAbilities {
|
||||
|
||||
/**
|
||||
* Check if the ability system is enabled for this NPC.
|
||||
*
|
||||
* @return true if enabled
|
||||
*/
|
||||
boolean isEnabled();
|
||||
|
||||
/**
|
||||
* Enable or disable the ability system for this NPC.
|
||||
*
|
||||
* @param enabled whether to enable
|
||||
*/
|
||||
void setEnabled(boolean enabled);
|
||||
|
||||
/**
|
||||
* Get all abilities assigned to this NPC (resolved from slots).
|
||||
* Returns safe deep copies. Use {@link #getSourceAbility(String)} for live references.
|
||||
*
|
||||
* @return array of abilities
|
||||
*/
|
||||
IAbility[] getAbilities();
|
||||
|
||||
/**
|
||||
* Add an inline ability to this NPC.
|
||||
*
|
||||
* @param ability the ability to add
|
||||
*/
|
||||
void addAbility(IAbility ability);
|
||||
|
||||
/**
|
||||
* Add a reference ability by key (built-in name or custom UUID).
|
||||
*
|
||||
* @param key the ability reference key
|
||||
*/
|
||||
void addAbilityReference(String key);
|
||||
|
||||
/**
|
||||
* Remove an ability by ID.
|
||||
*
|
||||
* @param abilityId the ability ID to remove
|
||||
*/
|
||||
void removeAbility(String abilityId);
|
||||
|
||||
/**
|
||||
* Get an ability by ID.
|
||||
* Returns a safe deep copy. Use {@link #getSourceAbility(String)} for the live reference.
|
||||
*
|
||||
* @param abilityId the ability ID
|
||||
* @return the ability, or null
|
||||
*/
|
||||
IAbility getAbility(String abilityId);
|
||||
|
||||
/**
|
||||
* Check if the NPC has an ability with the given ID.
|
||||
*
|
||||
* @param abilityId the ability ID
|
||||
* @return true if found
|
||||
*/
|
||||
boolean hasAbility(String abilityId);
|
||||
|
||||
/**
|
||||
* Check if a slot is a reference (by ability ID).
|
||||
*
|
||||
* @param abilityId the ability ID
|
||||
* @return true if reference
|
||||
*/
|
||||
boolean isAbilityReference(String abilityId);
|
||||
|
||||
/**
|
||||
* Convert a reference slot to inline (by ability ID).
|
||||
* Returns false if the reference cannot be resolved.
|
||||
*
|
||||
* @param abilityId the ability ID
|
||||
* @return true if converted successfully
|
||||
*/
|
||||
boolean convertToInline(String abilityId);
|
||||
|
||||
@@ -67,11 +91,15 @@ public interface IDataAbilities {
|
||||
/**
|
||||
* Get the currently executing ability, or null if none.
|
||||
* Returns a safe deep copy. Use {@link #getSourceCurrentAbility()} for the live reference.
|
||||
*
|
||||
* @return the current ability, or null
|
||||
*/
|
||||
IAbility getCurrentAbility();
|
||||
|
||||
/**
|
||||
* Check if any ability is currently executing.
|
||||
*
|
||||
* @return true if executing
|
||||
*/
|
||||
boolean isExecutingAbility();
|
||||
|
||||
@@ -87,11 +115,15 @@ public interface IDataAbilities {
|
||||
|
||||
/**
|
||||
* Get the global cooldown timer in ticks.
|
||||
*
|
||||
* @return cooldown in ticks
|
||||
*/
|
||||
int getGlobalCooldown();
|
||||
|
||||
/**
|
||||
* Set the global cooldown timer in ticks.
|
||||
*
|
||||
* @param ticks cooldown in ticks
|
||||
*/
|
||||
void setGlobalCooldown(int ticks);
|
||||
|
||||
|
||||
Reference in new issue
Block a user