onClick

abstract fun onClick(index: Int, block: (InventoryClickEvent) -> Unit?)

Set the action on click.

Since

1.0.0

Parameters

index

Slot number to set.

block

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


abstract fun onClick(block: (InventoryClickEvent) -> Unit?)

Change the action that is executed before each action of item on click. The default is event cancellation.

Since

1.0.0

Parameters

block

Click action