onDespawn

abstract fun onDespawn(handler: DespawnDsl.() -> Unit)

Registers a handler called when this entity stops being visible to a player.