indexOf

fun indexOf(item: Item): Int

Gets the index of any item in the inventory, and returns the slot number. Returns -1 if the inventory does not contain the item.

Return

the index of the given item

Parameters

item

the item to check for


fun indexOf(id: Int): Int

Gets the index of any item in the inventory with matching ID, and returns the slot number. Returns -1 if the inventory does not contain the item.

Return

the index of the given item with ID

Parameters

id

the item ID to check for