Class SkillHealEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityRegainHealthEvent
studio.magemonkey.fabled.api.event.SkillHealEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class SkillHealEvent
extends org.bukkit.event.entity.EntityRegainHealthEvent
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.entity.EntityRegainHealthEvent
org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
-
Constructor Summary
ConstructorsConstructorDescriptionSkillHealEvent
(org.bukkit.entity.LivingEntity healer, org.bukkit.entity.LivingEntity target, double amount) Initializes a new event -
Method Summary
Modifier and TypeMethodDescriptiondouble
Retrieves the amount of health healedorg.bukkit.entity.LivingEntity
Retrieves the entity that dealt the healorg.bukkit.entity.LivingEntity
Retrieves the entity that received the healboolean
Checks whether the event is cancelledvoid
setAmount
(double amount) Sets the amount of health healedvoid
setCancelled
(boolean cancelled) Sets the cancelled state of the eventMethods inherited from class org.bukkit.event.entity.EntityRegainHealthEvent
getHandlerList, getHandlers, getRegainReason
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityType
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
SkillHealEvent
public SkillHealEvent(org.bukkit.entity.LivingEntity healer, org.bukkit.entity.LivingEntity target, double amount) Initializes a new event- Parameters:
healer
- entity dealing the healtarget
- entity receiving the healamount
- the amount of health healed
-
-
Method Details
-
isCancelled
public boolean isCancelled()Checks whether the event is cancelled- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Overrides:
isCancelled
in classorg.bukkit.event.entity.EntityRegainHealthEvent
- 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
- Overrides:
setCancelled
in classorg.bukkit.event.entity.EntityRegainHealthEvent
- Parameters:
cancelled
- the cancelled state of the event
-
getHealer
public org.bukkit.entity.LivingEntity getHealer()Retrieves the entity that dealt the heal- Returns:
- entity that dealt the heal
-
getTarget
public org.bukkit.entity.LivingEntity getTarget()Retrieves the entity that received the heal- Returns:
- entity that received the heal
-
getAmount
public double getAmount()Retrieves the amount of health healed- Overrides:
getAmount
in classorg.bukkit.event.entity.EntityRegainHealthEvent
- Returns:
- amount of health healed
-
setAmount
public void setAmount(double amount) Sets the amount of health healed- Overrides:
setAmount
in classorg.bukkit.event.entity.EntityRegainHealthEvent
- Parameters:
amount
- amount of health healed
-