EntityEvents.death
2026/7/28小於 1 分鐘
/**
* Invoked before a living entity dies.
*
* **NOTE**: You need to set hp to > 0 besides cancelling the event to prevent the entity from dying.
*/
function death(
extra: $ResourceKey$$Type<$EntityType<object>>,
handler: (event: $LivingEntityDeathKubeEvent) => void,
): void;
function death(handler: (event: $LivingEntityDeathKubeEvent) => void): void;