item

fun item(slot: Int, inventoryItem: InventoryItem): InventoryBuilder(source)

This function is used to add an item to the inventory

Return

The current instance

Parameters

slot

The slot in which the item should be placed

inventoryItem

The item to be placed in the slot