# InventoryPlayer

The player's inventory.

### Properties

#### currentItem

> **currentItem**: `number`

The currently selected hotbar slot index (0-8).

***

#### hotBarSize

> `readonly` **hotBarSize**: `number`

The number of slots in the hotbar (always 9).

### Methods

#### dropAllItems()

> **dropAllItems**(): `void`

Drops all items from the player's inventory.

**Returns**

`void`

***

#### getCurrentSlot()

> **getCurrentSlot**(): `number`

**Returns**

`number`

The currently selected hotbar slot index (0-8).

***

#### getSizeInventory()

> **getSizeInventory**(): `number`

**Returns**

`number`

The total number of inventory slots (main + armor = 40).

***

#### getStackInSlot()

> **getStackInSlot**(`slot`): [`ItemStack`](https://scripting.breeze.rip/api/net/minecraft/item/itemstack)

**Parameters**

**slot**

`number`

**Returns**

[`ItemStack`](https://scripting.breeze.rip/api/net/minecraft/item/itemstack)

The ItemStack in the given slot, or null if empty.

***

#### getTotalArmorValue()

> **getTotalArmorValue**(): `number`

**Returns**

`number`

The total armor value (defense points) of the player's equipped armor.
