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.RegainReasonNested 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 TypeMethodDescriptiondoubleRetrieves the amount of health healedorg.bukkit.entity.LivingEntityRetrieves the entity that dealt the healorg.bukkit.entity.LivingEntityRetrieves the entity that received the healbooleanChecks whether the event is cancelledvoidsetAmount(double amount) Sets the amount of health healedvoidsetCancelled(boolean cancelled) Sets the cancelled state of the eventMethods inherited from class org.bukkit.event.entity.EntityRegainHealthEvent
getHandlerList, getHandlers, getRegainReasonMethods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityTypeMethods 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:
isCancelledin interfaceorg.bukkit.event.Cancellable- Overrides:
isCancelledin 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:
setCancelledin interfaceorg.bukkit.event.Cancellable- Overrides:
setCancelledin 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:
getAmountin classorg.bukkit.event.entity.EntityRegainHealthEvent- Returns:
- amount of health healed
-
setAmount
public void setAmount(double amount) Sets the amount of health healed- Overrides:
setAmountin classorg.bukkit.event.entity.EntityRegainHealthEvent- Parameters:
amount- amount of health healed
-