Class CauldronIngredientsDropEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
wtf.choco.alchema.api.event.CauldronEvent
wtf.choco.alchema.api.event.CauldronIngredientsDropEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class CauldronIngredientsDropEvent
extends CauldronEvent
implements org.bukkit.event.Cancellable
Called when a cauldron drops its ingredients in the world.
Author:
Parker Hawke - Choco
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  CauldronIngredientsDropEvent.Reason
    Represents a reason for the CauldronIngredientsDropEvent to be called.

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor Description
    CauldronIngredientsDropEvent​(@NotNull AlchemicalCauldron cauldron, @NotNull java.util.Collection<@NotNull org.bukkit.entity.Item> items, @Nullable org.bukkit.entity.Player player, @NotNull CauldronIngredientsDropEvent.Reason reason)
  • Method Summary

    Modifier and Type Method Description
    static @NotNull org.bukkit.event.HandlerList getHandlerList()
    Get the HandlerList instance for this event.
    @NotNull org.bukkit.event.HandlerList getHandlers()  
    @NotNull java.util.List<@NotNull org.bukkit.entity.Item> getItems()
    Get the Items to be dropped by the cauldron.
    @Nullable org.bukkit.entity.Player getPlayer()
    Get the player that caused this event (if any).
    @NotNull CauldronIngredientsDropEvent.Reason getReason()
    Get the reason for this event being called.
    boolean isCancelled()  
    void setCancelled​(boolean cancel)  

    Methods inherited from class wtf.choco.alchema.api.event.CauldronEvent

    getCauldron

    Methods inherited from class org.bukkit.event.block.BlockEvent

    getBlock

    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

    • CauldronIngredientsDropEvent

      public CauldronIngredientsDropEvent​(@NotNull @NotNull AlchemicalCauldron cauldron, @NotNull @NotNull java.util.Collection<@NotNull org.bukkit.entity.Item> items, @Nullable @Nullable org.bukkit.entity.Player player, @NotNull @NotNull CauldronIngredientsDropEvent.Reason reason)
      Parameters:
      cauldron - the cauldron that caused the craft
      items - the items to be dropped
      player - the player
      reason - the reason for this event
  • Method Details

    • getItems

      @NotNull public @NotNull java.util.List<@NotNull org.bukkit.entity.Item> getItems()
      Get the Items to be dropped by the cauldron. The returned list is mutable. Any changes made to the returned collection will directly affect which items are dropped after this event has been processed.
      Returns:
      the list of items to drop
    • getPlayer

      @Nullable public @Nullable org.bukkit.entity.Player getPlayer()
      Get the player that caused this event (if any).
      Returns:
      the player
    • getReason

      @NotNull public @NotNull CauldronIngredientsDropEvent.Reason getReason()
      Get the reason for this event being called.
      Returns:
      the reason
    • 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