Inventory
paper/inventory_slot
Inventory Slot
Gets or sets the item in a specific inventory slot of a player.
Note: Slots 0–8 are the hotbar, 9–35 are the main storage, 36–39 are armour (boots→helmet), and 40 is the off-hand. Out-of-range slot indices are silently ignored.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
exec |
exec | Incoming execution. | |
player |
player | The player whose inventory to access. | |
slot |
number | ✓ | Slot index (0–35 for main inventory; 36–39 armour; 40 off-hand). |
item |
item_stack | ✓ | Item to place in the slot (SET only). |
Outputs
| Name | Type | Description |
|---|---|---|
exec |
exec | Continues after the operation. |
item |
item_stack | Item currently (or previously) in the slot. |
Properties
| Key | Type | Default | Description |
|---|---|---|---|
op |
string | "GET" |
GET or SET. |
slot |
number | 0 |
Slot Index |
Examples
Clear a specific hotbar slot
Remove the item in hotbar slot 0.
- Set op=SET, slot=0
- Do not connect an item — the slot will be set to AIR.