Package org.mcmonkey.sentinel.events
Class SentinelAttackEvent
java.lang.Object
org.bukkit.event.Event
net.citizensnpcs.api.event.CitizensEvent
net.citizensnpcs.api.event.NPCEvent
org.mcmonkey.sentinel.events.SentinelAttackEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class SentinelAttackEvent
extends net.citizensnpcs.api.event.NPCEvent
implements org.bukkit.event.Cancellable
Event fired when a Sentinel NPC is going to attack.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionSentinelAttackEvent(net.citizensnpcs.api.npc.NPC npc, org.bukkit.entity.LivingEntity target) Constructs the attack event. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListReturns the handler list for use with Bukkit.org.bukkit.event.HandlerListReturns the handler list for use with Bukkit.org.bukkit.entity.LivingEntityReturns the entity targeted by the NPC's attack.booleanReturns whether the event is cancelled.voidsetCancelled(boolean cancelled) Sets whether the event is cancelled.Methods inherited from class net.citizensnpcs.api.event.NPCEvent
getNPCMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
SentinelAttackEvent
public SentinelAttackEvent(net.citizensnpcs.api.npc.NPC npc, org.bukkit.entity.LivingEntity target) Constructs the attack event.
-
-
Method Details
-
getTarget
public org.bukkit.entity.LivingEntity getTarget()Returns the entity targeted by the NPC's attack. -
getHandlers
public org.bukkit.event.HandlerList getHandlers()Returns the handler list for use with Bukkit.- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Returns the handler list for use with Bukkit. -
isCancelled
public boolean isCancelled()Returns whether the event is cancelled.- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) Sets whether the event is cancelled.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-