fun <reified K : Entity> on_self_despawn(behaviour: (self: K) -> Unit)
(self: K) -> Unit
Works with: Entity
Entity
node<Npc>() on_self_despawn { npc -> Logger.info("the skeleton in shard ${npc.shardId} left the world")}