onClick

fun onClick(onClick: suspend (GuiClickEvent) -> Unit)(source)

And event callback which will be invoked if a player interacts with the inventory.