Class InventoryClickEvent

java.lang.Object
net.minestom.server.event.inventory.InventoryClickEvent
All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, InventoryEvent, PlayerEvent, PlayerInstanceEvent

public class InventoryClickEvent extends Object implements InventoryEvent, PlayerInstanceEvent
Called after InventoryPreClickEvent, this event cannot be cancelled and items related to the click are already moved.
  • Constructor Details

  • Method Details

    • getPlayer

      public Player getPlayer()
      Gets the player who clicked in the inventory.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player who clicked in the inventory
    • getSlot

      public int getSlot()
      Gets the clicked slot number.
      Returns:
      the clicked slot number
    • getClickType

      public ClickType getClickType()
      Gets the click type.
      Returns:
      the click type
    • getClickedItem

      public ItemStack getClickedItem()
      Gets the clicked item.
      Returns:
      the clicked item
    • getCursorItem

      public ItemStack getCursorItem()
      Gets the item in the player cursor.
      Returns:
      the cursor item
    • getInventory

      public AbstractInventory getInventory()
      Description copied from interface: InventoryEvent
      Gets the inventory that was clicked.
      Specified by:
      getInventory in interface InventoryEvent