Package noppes.npcs.api.event
Interface IAbilityEvent
-
- All Superinterfaces:
ICustomNPCsEvent,INpcEvent
- All Known Subinterfaces:
IAbilityEvent.CompleteEvent,IAbilityEvent.ExecuteEvent,IAbilityEvent.HitEvent,IAbilityEvent.InterruptEvent,IAbilityEvent.StartEvent,IAbilityEvent.TickEvent,IAbilityEvent.ToggleEvent,IAbilityEvent.ToggleUpdateEvent
public interface IAbilityEvent extends INpcEvent
Events related to NPC ability execution. These events are fired during the ability lifecycle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIAbilityEvent.CompleteEventFired when an ability completes its full execution cycle.static interfaceIAbilityEvent.ExecuteEventFired when an ability enters the ACTIVE phase and performs its effect.static interfaceIAbilityEvent.HitEventFired when an ability hits an entity with damage.static interfaceIAbilityEvent.InterruptEventFired when an ability is interrupted by damage.static interfaceIAbilityEvent.StartEventFired when an ability starts executing (enters WINDUP phase).static interfaceIAbilityEvent.TickEventFired every tick while an ability is executing.static interfaceIAbilityEvent.ToggleEventFired when a toggle ability is switched ON or OFF.static interfaceIAbilityEvent.ToggleUpdateEventFired every 10 ticks for each active toggle ability.-
Nested classes/interfaces inherited from interface noppes.npcs.api.event.ICustomNPCsEvent
ICustomNPCsEvent.CNPCNaturalSpawnEvent, ICustomNPCsEvent.ScriptedCommandEvent
-
Nested classes/interfaces inherited from interface noppes.npcs.api.event.INpcEvent
INpcEvent.CollideEvent, INpcEvent.DamagedEvent, INpcEvent.DialogClosedEvent, INpcEvent.DialogEvent, INpcEvent.DiedEvent, INpcEvent.InitEvent, INpcEvent.InteractEvent, INpcEvent.KilledEntityEvent, INpcEvent.MeleeAttackEvent, INpcEvent.RangedLaunchedEvent, INpcEvent.SwingEvent, INpcEvent.TargetEvent, INpcEvent.TargetLostEvent, INpcEvent.TimerEvent, INpcEvent.UpdateEvent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IAbilitygetAbility()Get the ability involved in this event.IEntityLivingBasegetEntity()Get the entity executing the ability (NPC or Player).IPlayergetPlayer()Get the player executing the ability, or null if the caster is an NPC.IEntityLivingBasegetTarget()Get the target of the ability, or null if no target.booleanisNPC()Whether the entity executing the ability is an NPC.-
Methods inherited from interface noppes.npcs.api.event.ICustomNPCsEvent
getHookName
-
-
-
-
Method Detail
-
getEntity
IEntityLivingBase getEntity()
Get the entity executing the ability (NPC or Player).- Returns:
- the entity executing the ability
-
getPlayer
IPlayer getPlayer()
Get the player executing the ability, or null if the caster is an NPC.- Returns:
- the player executing the ability, or null if NPC
-
isNPC
boolean isNPC()
Whether the entity executing the ability is an NPC.- Returns:
- true if the executor is an NPC
-
getAbility
IAbility getAbility()
Get the ability involved in this event.- Returns:
- the ability being executed
-
getTarget
IEntityLivingBase getTarget()
Get the target of the ability, or null if no target.- Returns:
- the current target entity
-
-