Class InventoryClickEvent

java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.inventory.InventoryClickEvent

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

  • Method Details

    • getPlayer

      @NotNull public Player getPlayer()
      Gets the player who clicked in the inventory.
      Returns:
      the player who clicked in the inventory
    • getInventory

      @Nullable public Inventory getInventory()
      Can be null if the clicked inventory is the player one.
      Returns:
      the inventory where the click happened, null if this is the player's inventory
    • getSlot

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

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

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

      @NotNull public ItemStack getCursorItem()
      Gets the item in the player cursor.
      Returns:
      the cursor item