Add last_damager to the cause array of player_death event
LadyCailinBot opened this issue ยท 6 comments
CMDHELPER-2742 - Reported by Hekta
Add last_damager to the cause array of player_death event when provided (for example in "Hekta tried to swim in lava to escape '''Zombie'''").
Comment by PseudoKnight
Since this is already done in entity_death, you could refer to that.
Comment by jb_aero
I wrote that :P Both entity_death and player_death use the API for getting the last damager, but there currently isn't an API for "last different damager before that". Though this would be simple enough for someone to keep track of in their own code using entity_damage.
Comment by PseudoKnight
Oh, last_damager, not lastdamagecause. My brain went the wrong direction and assumed he wanted that feature from entity_death, despite the very clear example. ;)