Class InventoryOpenEvent

All Implemented Interfaces:
Cancellable

public class InventoryOpenEvent extends InventoryEvent implements Cancellable
Represents a player related inventory event
  • Constructor Details Link icon

    • InventoryOpenEvent Link icon

      public InventoryOpenEvent(@NotNull InventoryView transaction)
  • Method Details Link icon

    • getPlayer Link icon

      @NotNull public final HumanEntity getPlayer()
      Returns the player involved in this event
      Returns:
      Player who is involved in this event
    • isCancelled Link icon

      public boolean isCancelled()
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

      If an inventory open event is cancelled, the inventory screen will not show.

      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if this event is cancelled
    • setCancelled Link icon

      public void setCancelled(boolean cancel)
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

      If an inventory open event is cancelled, the inventory screen will not show.

      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - true if you wish to cancel this event
    • getHandlers Link icon

      @NotNull public HandlerList getHandlers()
      Overrides:
      getHandlers in class InventoryEvent
    • getHandlerList Link icon

      @NotNull public static HandlerList getHandlerList()