on inventory_clickorg.bukkit.event.inventory.InventoryClickEventInventory1.0.0
Description
Fires when a player clicks inside an inventory. Provides the clicked slot, click type, inventory title, clicked item, and cursor item.
Variables
playerPlayer
NullableNo
The player who clicked
inventoryInventory
NullableNo
The top inventory being viewed
nameString
NullableNo
The Lumen inventory name, or empty if not a Lumen inventory
slotint
NullableNo
The slot index that was clicked
rawSlotint
NullableNo
The raw slot index including both top and bottom inventory
clickTypeString
NullableNo
The click type: LEFT, RIGHT, SHIFT_LEFT, SHIFT_RIGHT, MIDDLE, etc.
actionString
NullableNo
The inventory action: PICKUP_ALL, PLACE_ALL, SWAP_WITH_CURSOR, etc.
titleString
NullableNo
The display title of the inventory
itemItemStack
NullableYes
The item in the clicked slot, or null if the slot is empty
cursorItemStack
NullableYes
The item on the cursor, or null if the cursor is empty
Examples
on inventory_click:on inventory_click:
if name is "main_menu":
cancel event