Triggers
trigger/inventory_click
Inventory Click Trigger
Fires when a player clicks inside any inventory.
Note: Cancel the event using Event Cancel to prevent item movement. Filter by inventoryTitle to target custom GUI inventories.
Outputs
| Name | Type | Description |
|---|---|---|
exec |
exec | Fires on click. |
player |
player | The player who clicked. |
slot |
number | The slot index that was clicked (0-based). |
item |
string | Material name of the clicked item, or AIR if the slot was empty. |
inventoryTitle |
string | The title of the open inventory. |
Examples
Custom GUI button
Detect a click in a custom shop GUI and run logic.
- Connect inventoryTitle → String Ops (EQUALS) → Branch
- On true branch: proceed with your shop logic
- Cancel the event to prevent item drag-out