on_corpse_spawn
Fires when a player dies and their corpse appears in the world.
Unlike a plain action, this goes through the engine's trigger pipeline, so the criteria and modifiers on the entries it triggers are evaluated normally.
Fields
| Field | Type | Description |
|---|---|---|
triggers | List<Ref<Triggerable>> | Entries to trigger when the corpse spawns. |
Context keys
| Key | Type | Description |
|---|---|---|
OWNER_NAME | String | Name of the dead player. |
OWNER_UUID | String | UUID of the dead player. |
EXPERIENCE | Int | Experience stored in the corpse. |
ITEM_COUNT | Int | Number of non-empty item stacks in the corpse. |
CORPSE_POSITION | Position | Where the corpse stands. |
How could this be used?
Announce the death, start a "recover your things" quest, or record where the player fell.