onClick

fun onClick(onClick: (InventoryClickEvent) -> Unit): ItemBuilder(source)

Sets the click event for the item.

Return

the updated ItemBuilder object.

Parameters

onClick

the function to be called when the item is clicked. The function receives an InventoryClickEvent parameter.