Class EntityDamageByCauldronEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
wtf.choco.alchema.api.event.entity.EntityDamageByCauldronEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class EntityDamageByCauldronEvent
extends org.bukkit.event.entity.EntityEvent
implements org.bukkit.event.Cancellable
Called when an
LivingEntity
is damaged by an AlchemicalCauldron
.- Author:
- Parker Hawke - Choco
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
Constructors Constructor Description EntityDamageByCauldronEvent(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull AlchemicalCauldron cauldron, double damage)
Construct a newEntityDamageByCauldronEvent
. -
Method Summary
Modifier and Type Method Description @NotNull AlchemicalCauldron
getCauldron()
Get theAlchemicalCauldron
involved in this event.double
getDamage()
Get the damage to be inflicted on the entity.@NotNull org.bukkit.entity.LivingEntity
getEntity()
static @NotNull org.bukkit.event.HandlerList
getHandlerList()
Get the HandlerList instance for this event.@NotNull org.bukkit.event.HandlerList
getHandlers()
boolean
isCancelled()
void
setCancelled(boolean cancel)
void
setDamage(double damage)
Set the damage to be inflicted on the entity.Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntityType
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
EntityDamageByCauldronEvent
public EntityDamageByCauldronEvent(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull AlchemicalCauldron cauldron, double damage)Construct a newEntityDamageByCauldronEvent
.- Parameters:
entity
- the entity damaged by the cauldroncauldron
- the cauldron that inflicted the damagedamage
- the damage inflicted upon the entity
-
-
Method Details
-
getEntity
@NotNull public @NotNull org.bukkit.entity.LivingEntity getEntity()- Overrides:
getEntity
in classorg.bukkit.event.entity.EntityEvent
-
getCauldron
Get theAlchemicalCauldron
involved in this event.- Returns:
- the cauldron
-
setDamage
public void setDamage(double damage)Set the damage to be inflicted on the entity.- Parameters:
damage
- the damage to inflict. Must be >= 0.0
-
getDamage
public double getDamage()Get the damage to be inflicted on the entity.- Returns:
- the damage
-
setCancelled
public void setCancelled(boolean cancel)- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()Get the HandlerList instance for this event.- Returns:
- the handler list
-