addInteractHandler

fun addInteractHandler(entity: Entity, click: EffectiveAbstractInteract.Click, callback: InteractCallback, cooldownData: EffectiveAbstractInteract.CooldownData<EffectiveEntityInteractable.EventsCallOptions>? = null)

Registers an interact handler matching entities like entity: by custom-entity key if entity has one, otherwise by entity's org.bukkit.entity.EntityType (so pass a plain vanilla entity to match all entities of that type).