Paper
Paper copied to clipboard
Add lastDamageSource to living entities
Is your feature request related to a problem?
Supporting lastDamageSource is from my perspective a better implementation to lastDamageCause and provides the same and more information to the users. Especially in cases where a custom damage type might be defined.
Describe the solution you'd like.
I would like a method added onto LivingEntity preferably like #getLastDamageSource matching it along with getLastDamage and getLastDamageCause
Describe alternatives you've considered.
I haven't considered any alternatives to this implementation
Other
While I'm aware that getLastDamageCause returns EntityDamageEvent I find this behavior of it in poor taste, I would rather use a method provided by minecraft than one that I assume is custom made by the server.