onClick

abstract fun onClick(action: KInventory.(RegisteredKItem, Player) -> Unit)

Executed when the item is valid clicked in an inventory

A valid click is when the item actually belongs to the inventory assigned to it and the item is inside a KInventory

Parameters

action

run when the item is clicked