onDamage

fun Entity.onDamage(plugin: Plugin, handle: EntityDamageEvent.() -> Unit)

Executes the handle when this entity takes damage.