InventoryManager

Util class to handle inventories using their holders and uuids

These functions are handled by KIA, and the inventory events.

Author

Devin

Since

1.0.0

Functions

Link copied to clipboard
fun addInventory(inventory: KInventory)

Registers a new custom inventory

Link copied to clipboard
fun closedInventory(player: KInventoryHolder, kInventory: KInventory)

Removes the information that a player has opened an inventory

Link copied to clipboard

Generates a random unused uuid for an inventory

Link copied to clipboard

Gets the first inventory with the given id

Link copied to clipboard
fun isInventory(kInventory: KInventory): Boolean

Checks if the given inventory instance is a registered inventory

Checks if any inventory can be associated with the given id

Link copied to clipboard
fun isOpened(kInventory: KInventory): Boolean

Checks if the given inventory is opened

Link copied to clipboard
fun openedInventory(player: KInventoryHolder, kInventory: KInventory)

Saves that the current player has opened the given inventory

Link copied to clipboard

Removes the inventory associated with the given id and each item