# inventory

### player.inventory.slot

```lua
player.inventory.slot(slot_id): string
```

| Argument | Type   | Description             |
| -------- | ------ | ----------------------- |
| slot\_id | Number | ID of the slot to check |

Returns the name of the item in the slot

### player.inventory.item\_information

```lua
player.inventory.item_information(slot_id): string, string, number, number, table
```

| Argument | Type   | Description             |
| -------- | ------ | ----------------------- |
| slot\_id | Number | ID of the slot to check |

Returns item name, display name, item damage, efficiency and a table containing all enchants

### player.inventory.swap

```lua
player.inventory.swap(slot_id, hotbar_slot)
```

| Argument     | Type   | Description                                      |
| ------------ | ------ | ------------------------------------------------ |
| slot\_id     | Number | ID of the slot to swap                           |
| hotbar\_slot | Number | Hotbar slot number where the item will be set at |

Moves an item to your hotbar

### player.inventory.click

```lua
player.inventory.click(slot_id, mouse_click, mode)
```

| Argument     | Type   | Description                                                         |
| ------------ | ------ | ------------------------------------------------------------------- |
| slot\_id     | Number | ID of the slot to swap                                              |
| mouse\_click | Number | Mouse click                                                         |
| mode         | Number | <p>1: to hold click<br>0: to normal click</p><p>4: to drop item</p> |

Clicks an item in your inventory or chest

### player.inventory.drop

```lua
player.inventory.drop(slot_id)
```

| Argument | Type   | Description            |
| -------- | ------ | ---------------------- |
| slot\_id | Number | ID of the slot to drop |

Drops an item in your inventory

### player.inventory.get\_item\_stack

```lua
player.inventory.get_item_stack(slot_id): number
```

| Argument | Type   | Description    |
| -------- | ------ | -------------- |
| slot\_id | Number | ID of the slot |

Returns the amount of items in the desired slot
