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

NameTypeDescription
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.

  1. Connect inventoryTitle → String Ops (EQUALS) → Branch
  2. On true branch: proceed with your shop logic
  3. Cancel the event to prevent item drag-out