| Name | entity despawns |
| Event Lines | <entity> despawns |
| Triggers | when an entity despawns permanently from the world. May fire repeatedly for one entity. |
| Generated Examples | on monster despawns:
on entity despawns: |
| Has NPC | when the entity that despawned is an NPC. |
| Switches | cause:<cause> to only process the event when it came from a specified cause. |
| Contexts | <context.entity> returns the entity that despawned.
<context.cause> returns the reason the entity despawned. Can be: DEATH, CHUNK_UNLOAD, CITIZENS, or OTHER
|
| Has Location | True - This adds the switches 'in:<area>', 'location_flagged:<flag>', ... |
| Group | Entity |
| Warning(s) | this event fires very rapidly. |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityDespawnScriptEvent.java#L12 |