onAttack

abstract fun onAttack(handler: AttackDsl.() -> Unit)

Registers a handler called on the main server thread when a player attacks this entity (left click).