Skip to content

Inventory

Represents an entity's inventory.

contains(item: Item) -> Boolean

Returns whether the item is in the inventory.

count(item: Item) -> Integer

Returns how many of item is in the inventory.

getStack(slot: Integer) -> ItemStack

Returns the stack in the slot slot.

isEmpty() -> Boolean

Returns whether the inventory is empty.

removeStack(stack: ItemStack) -> Null

Removes stack from the inventory.

setStack(slot: Integer, stack: ItemStack) -> Null

Sets the stack at slot slot to the stack stack.