Package noppes.npcs.api.event
Interface IChainEvent
-
- All Superinterfaces:
ICustomNPCsEvent
- All Known Subinterfaces:
IChainEvent.CompleteEvent,IChainEvent.InterruptEvent,IChainEvent.NextEvent,IChainEvent.StartEvent
public interface IChainEvent extends ICustomNPCsEvent
Events related to chained ability execution lifecycle. These fire at chain-level transitions, not per-ability. Unified for both NPCs and Players.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIChainEvent.CompleteEventFired when a chained ability sequence completes all entries.static interfaceIChainEvent.InterruptEventFired when a chained ability is interrupted by damage.static interfaceIChainEvent.NextEventFired when the chain advances to the next entry in the sequence.static interfaceIChainEvent.StartEventFired when a chained ability sequence starts executing.-
Nested classes/interfaces inherited from interface noppes.npcs.api.event.ICustomNPCsEvent
ICustomNPCsEvent.CNPCNaturalSpawnEvent, ICustomNPCsEvent.ScriptedCommandEvent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IChainedAbilitygetChain()Get the chained ability being executed.IEntityLivingBasegetEntity()Get the entity executing the chain (NPC or Player).intgetEntryIndex()Get the current entry index within the chain (0-based).ICustomNpc<?>getNpc()Get the NPC executing the chain, or null if the caster is a player.IPlayergetPlayer()Get the player executing the chain, or null if the caster is an NPC.IEntityLivingBasegetTarget()Get the target of the chain, or null if no target.booleanisNPC()Whether the entity executing the chain is an NPC.-
Methods inherited from interface noppes.npcs.api.event.ICustomNPCsEvent
getHookName
-
-
-
-
Method Detail
-
getEntity
IEntityLivingBase getEntity()
Get the entity executing the chain (NPC or Player).- Returns:
- the entity executing the chain
-
getPlayer
IPlayer getPlayer()
Get the player executing the chain, or null if the caster is an NPC.- Returns:
- the player executing the chain, or null if NPC
-
getNpc
ICustomNpc<?> getNpc()
Get the NPC executing the chain, or null if the caster is a player.- Returns:
- the NPC executing the chain, or null if player
-
isNPC
boolean isNPC()
Whether the entity executing the chain is an NPC.- Returns:
- true if the executor is an NPC
-
getChain
IChainedAbility getChain()
Get the chained ability being executed.- Returns:
- the chained ability being executed
-
getTarget
IEntityLivingBase getTarget()
Get the target of the chain, or null if no target.- Returns:
- the current target entity
-
getEntryIndex
int getEntryIndex()
Get the current entry index within the chain (0-based).- Returns:
- the current entry index in the chain
-
-