Перейти к основному содержимому

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

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

Context keys

KeyTypeDescription
OWNER_NAMEStringName of the dead player.
OWNER_UUIDStringUUID of the dead player.
EXPERIENCEIntExperience the corpse held.
ITEM_COUNTIntNumber of non-empty item stacks taken.
CORPSE_POSITIONPositionWhere 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.