add Click Handler
fun addClickHandler(click: EffectiveAbstractInteract.Click, callback: InteractCallback, ifRightClickOpenContainer: Boolean = false, cooldownData: EffectiveAbstractInteract.CooldownData<EffectiveClickable.EventsCallOptions>? = null)
Registers a click handler for stacks of this custom item (matched by key). To instead handle a plain vanilla Material, register through EffectiveClickable.addClickHandler with a non-custom stack.
Parameters
click
which mouse button triggers the callback
callback
invoked on click; its EffectiveAbstractInteract.Result decides whether the underlying Bukkit event is cancelled
if Right Click Open Container
allow the vanilla container to open on right-click instead of swallowing the interaction
cooldown Data
optional per-player cooldown for the handler