Class EntityDropEssenceEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
wtf.choco.alchema.api.event.entity.EntityDropEssenceEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class EntityDropEssenceEvent
extends org.bukkit.event.entity.EntityEvent
implements org.bukkit.event.Cancellable
Called when a LivingEntity is killed and drops a vial of entity essence.
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
    EntityDropEssenceEvent​(@NotNull org.bukkit.entity.Entity entity, @NotNull EntityEssenceData essenceData, int amountOfEssence)
  • Method Summary

    Modifier and Type Method Description
    int getAmountOfEssence()
    Get the amount of essence to be dropped by this entity.
    @NotNull EntityEssenceData getEssenceData()
    Get the EntityEssenceData dropped in this event.
    static @NotNull org.bukkit.event.HandlerList getHandlerList()
    Get the HandlerList instance for this event.
    @NotNull org.bukkit.event.HandlerList getHandlers()  
    boolean isCancelled()  
    void setAmountOfEssence​(int amountOfEssence)
    Set the amount of essence to be dropped by this entity.
    void setCancelled​(boolean cancel)  

    Methods inherited from class org.bukkit.event.entity.EntityEvent

    getEntity, 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

    • EntityDropEssenceEvent

      public EntityDropEssenceEvent​(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull EntityEssenceData essenceData, int amountOfEssence)
      Parameters:
      entity - the entity damaged by the cauldron
      essenceData - the essence data associated with the entity
      amountOfEssence - the amount of essence to be dropped
  • Method Details

    • setAmountOfEssence

      public void setAmountOfEssence​(int amountOfEssence)
      Set the amount of essence to be dropped by this entity.
      Parameters:
      amountOfEssence - the amount of essence to drop. Must be > 0
    • getAmountOfEssence

      public int getAmountOfEssence()
      Get the amount of essence to be dropped by this entity.
      Returns:
      the amount of essence to drop
    • getEssenceData

      @NotNull public @NotNull EntityEssenceData getEssenceData()
      Get the EntityEssenceData dropped in this event.
      Returns:
      the entity essence data
    • setCancelled

      public void setCancelled​(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Get the HandlerList instance for this event.
      Returns:
      the handler list