item

abstract fun item(index: Int, itemStack: ItemStack)

Set the item. The action on click is not changed, and the previous one is inherited.

Since

1.0.0

Parameters

index

Slot number to set.

itemStack

ItemStack to set.

Throws

When placing an item outside the inventory contents.


abstract fun item(index: Int, itemStack: ItemStack, block: (InventoryClickEvent) -> Unit?)

Set the item and the action on click.

Since

1.0.0

Parameters

index

Slot number to set.

itemStack

ItemStack to set.

block

Click action. If null, the action will be removed.

Throws

When placing an item outside the inventory contents.