Class AngelChestOpenEvent

java.lang.Object
org.bukkit.event.Event
de.jeff_media.angelchest.events.AngelChestOpenEvent
All Implemented Interfaces:
Cancellable

public class AngelChestOpenEvent extends Event implements Cancellable
Represents an event related to "opening" an AngelChest by either fast-looting it, opening its GUI or breaking the block itself. It will NOT get called when the inventory of an AngelChest is opened in preview (read-only) mode.
  • Constructor Details

  • Method Details

    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()
    • getAngelChest

      @NotNull public @NotNull AngelChest getAngelChest()
      Returns the AngelChest that is about to be opened
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Returns the player that is about to open the AngelChest
    • isCancelled

      public boolean isCancelled()
      Gets whether the event is cancelled. If the event is cancelled, the AngelChest will not be opened, fast-looted or broken.
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets whether the event is cancelled. If the event is cancelled, the AngelChest will not be opened, fast-looted or broken.
      Specified by:
      setCancelled in interface Cancellable
    • getReason

      @NotNull public @NotNull AngelChestOpenEvent.Reason getReason()
      Gets the Reason for opening the AngelChest