Skip to content

Inventory

endstone.inventory

Classes:

Name Description
Inventory

Interface to the various inventories.

ItemStack

Represents a stack of items.

PlayerInventory

Interface to the inventory of a Player, including the four armor slots and any extra slots.

Inventory

Interface to the various inventories.

Attributes:

Name Type Description
max_stack_size int

Returns the maximum stack size for an ItemStack in this inventory.

size int

Returns the size of the inventory

max_stack_size property

max_stack_size: int

Returns the maximum stack size for an ItemStack in this inventory.

size property

size: int

Returns the size of the inventory

ItemStack

ItemStack(type: str = 'minecraft:air', amount: int = 1)

Represents a stack of items.

Attributes:

Name Type Description
amount int

Gets or sets the amount of items in this stack.

type str

Gets or sets the type of this item.

amount property writable

amount: int

Gets or sets the amount of items in this stack.

type property writable

type: str

Gets or sets the type of this item.

PlayerInventory

Bases: Inventory

Interface to the inventory of a Player, including the four armor slots and any extra slots.