Is your feature request related to a problem?
I want to reliably get the entity involved in killing a player upon their death, if there is one. In cases where an entity is directly responsible for the player's death, this can easily be done with PlayerDeathEvent#getDamageSource#getCausingEntity. However, this returns null in cases where the entity is indirectly responsible, such as when a player is "doomed to fall" by an entity. Calling Player#getKiller is not a solution for this, because that only returns a Player.
Proof that Minecraft tracks the killing entity in these indirect cases:

Describe the solution you'd like.
Some kind of PlayerDeathEvent#getKiller method that returns an Entity representing the entity that is directly, or indirectly, responsible for the player's death, as tracked by Minecraft.
Describe alternatives you've considered.
Already described in the "Is your feature request related to a problem?" section.
Other
No response
Is your feature request related to a problem?
I want to reliably get the entity involved in killing a player upon their death, if there is one. In cases where an entity is directly responsible for the player's death, this can easily be done with
PlayerDeathEvent#getDamageSource#getCausingEntity. However, this returnsnullin cases where the entity is indirectly responsible, such as when a player is "doomed to fall" by an entity. CallingPlayer#getKilleris not a solution for this, because that only returns aPlayer.Proof that Minecraft tracks the killing entity in these indirect cases:
Describe the solution you'd like.
Some kind of
PlayerDeathEvent#getKillermethod that returns anEntityrepresenting the entity that is directly, or indirectly, responsible for the player's death, as tracked by Minecraft.Describe alternatives you've considered.
Already described in the "Is your feature request related to a problem?" section.
Other
No response