onClick

fun onClick(action: InventoryClickEvent.() -> Unit)

Set the action to be executed when the player clicks on any slot while the GUI is open.