on_corpse_loot
Fires when a corpse is emptied, by its owner or by someone else. The player the event runs for is the looter, not necessarily the owner.
Fields
| Field | Type | Description |
|---|---|---|
triggers | List<Ref<Triggerable>> | Entries to trigger when the corpse is looted. |
Context keys
| Key | Type | Description |
|---|---|---|
OWNER_NAME | String | Name of the dead player. |
OWNER_UUID | String | UUID of the dead player. |
EXPERIENCE | Int | Experience the corpse held. |
ITEM_COUNT | Int | Number of non-empty item stacks taken. |
CORPSE_POSITION | Position | Where the corpse stood. |
How could this be used?
Complete a recovery objective, or reward a player who returns loot to its owner — compare
OWNER_UUID against the looter to tell the two cases apart.