Class MobDespawnEvent

java.lang.Object
net.neoforged.bus.api.Event

public class MobDespawnEvent extends MobSpawnEvent
This event is fired from Mob.checkDespawn().
It fires once per tick per mob that is attempting to despawn.

It is fired for all entities, including persistent entities. Additionally, it may be used to keep mobs from despawning in peaceful mode.

This event is only fired on the logical server.

See Also: