Class SkillPushEvent
java.lang.Object
org.bukkit.event.Event
studio.magemonkey.fabled.api.event.SkillPushEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class SkillPushEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
An event for when an entity is healed by
another entity with the use of a skill.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionSkillPushEvent
(org.bukkit.entity.LivingEntity caster, org.bukkit.entity.LivingEntity target, org.bukkit.util.Vector velocity) Initializes a new event -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.LivingEntity
Retrieves the entity initiating the push event.static org.bukkit.event.HandlerList
Retrieves the handlers for the eventorg.bukkit.event.HandlerList
Retrieves the handlers for the eventorg.bukkit.entity.LivingEntity
Retrieves the entity getting pushed.org.bukkit.util.Vector
Gets theVector
of the push.boolean
Checks whether the event is cancelledvoid
setCancelled
(boolean cancelled) Sets the cancelled state of the eventvoid
setVelocity
(org.bukkit.util.Vector velocity) Sets theVector
the push will use.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
SkillPushEvent
public SkillPushEvent(org.bukkit.entity.LivingEntity caster, org.bukkit.entity.LivingEntity target, org.bukkit.util.Vector velocity) Initializes a new event- Parameters:
caster
- entity doing the pushingtarget
- entity receiving the pushvelocity
- the amount of damage dealt
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Retrieves the handlers for the event- Returns:
- list of event handlers
-
setVelocity
public void setVelocity(org.bukkit.util.Vector velocity) Sets theVector
the push will use.- Parameters:
velocity
-
-
isCancelled
public boolean isCancelled()Checks whether the event is cancelled- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Returns:
- true if cancelled, false otherwise
-
setCancelled
public void setCancelled(boolean cancelled) Sets the cancelled state of the event- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Parameters:
cancelled
- the cancelled state of the event
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()Retrieves the handlers for the event- Specified by:
getHandlers
in classorg.bukkit.event.Event
- Returns:
- list of event handlers
-
getCaster
public org.bukkit.entity.LivingEntity getCaster()Retrieves the entity initiating the push event.- Returns:
- entity that is doing the pushing.
-
getTarget
public org.bukkit.entity.LivingEntity getTarget()Retrieves the entity getting pushed.- Returns:
- entity that is getting pushing.
-
getVelocity
public org.bukkit.util.Vector getVelocity()Gets theVector
of the push.- Returns:
- the velocity at which the push is happening.
-