Skip to main content

on_corpse_expire

Fires when a corpse reaches the end of its lifetime without being looted. The event runs for the owner, if they are online.

Clearing corpses with the admin command does not fire this event, so staff cleanup cannot hand players a death penalty they did not earn.

Fields

FieldTypeDescription
triggersList<Ref<Triggerable>>Entries to trigger when the corpse expires.

Context keys

KeyTypeDescription
OWNER_NAMEStringName of the dead player.
OWNER_UUIDStringUUID of the dead player.
EXPERIENCEIntExperience lost with the corpse.
ITEM_COUNTIntNumber of item stacks lost.
CORPSE_POSITIONPositionWhere the corpse stood.

How could this be used?

Tell the owner their belongings are gone, or apply a death penalty.