onDeath

fun Entity.onDeath(plugin: Plugin, handle: EntityDeathEvent.() -> Unit)

Executes the handle when this entity dies.