getId
getId: (ItemContainer) -> numberThe container's id (InventoryID), with 0x8000 for another player's.
client:getItemContainer(…)| Method | Returns | Description |
|---|---|---|
getId() | number | The container's id (InventoryID), with 0x8000 for another player's. |
getItems() | {Item} | Every slot's item, empty slots as id -1 quantity 0. |
getItem(number) | Item? | The item in slot, or nil for an empty slot or one past the end. |
contains(number) | boolean | Whether any slot holds itemId. |
count(number) | number | (ItemContainer, number) -> number: How many of itemId the container holds: the quantity of the first slot of it holding more than one (… |
count() | number | |
size() | number | How many slots there are, empty ones included. |
find(number) | number | The first slot holding itemId, or -1. |
| Method | Returns | Description |
|---|---|---|
Client.getItemContainer | ItemContainer? | (Client, number) -> ItemContainer?: Item container id (an InventoryID), or nil when the client has none. |
ItemContainerChanged.getItemContainer | ItemContainer? | The container, read live (nil only when the client removed it again before the event was delivered). |
getIdgetId: (ItemContainer) -> numberThe container's id (InventoryID), with 0x8000 for another player's.
getItemsgetItems: (ItemContainer) -> {Item}Every slot's item, empty slots as id -1 quantity 0.
getItemgetItem: (ItemContainer, number) -> Item?The item in slot, or nil for an empty slot or one past the end.
containscontains: (ItemContainer, number) -> booleanWhether any slot holds itemId.
countcount: ((ItemContainer, number) -> number) & ((ItemContainer) -> number)(ItemContainer, number) -> number: How many of itemId the container holds: the quantity of the first slot of it holding more than one (a stack), else the number of slots holding it (unstacked items, one each).
(ItemContainer) -> number: How many slots hold an item.
sizesize: (ItemContainer) -> numberHow many slots there are, empty ones included.
findfind: (ItemContainer, number) -> numberThe first slot holding itemId, or -1.