[BUG] Mobs custom death messages not displayed when damaged from different sources
Server version: Paper 1.19.4
MythicMobs version: 5.6.1
Summary
I found out that specific mobs Death Messages in Mythicmobs stop working when there is something more than the mob damaging the player at the same time. For example, if there is a mob called "FireMob" and it ignites the player when hitting them, as there is the mob and the fire damaging the player at the same time, the death message of the FireMob will not be displayed, instead, the vanilla " was burned when escaping " will display.
Steps to reproduce
- Have a mob with a custom kill message
- Give the mob the ability to ignite when hitting the player (so it is easier to reproduce)
- Get killed by the mob and the vanilla death message will display instead.
Current behavior
The vanilla death message is showing in chat instead of the custom mob's death message.
Intended correct behavior
The vanilla death message should be overrided by the custom mob's death message .
Server log file
No logs or errors in console.
Proposed fixes
The issue is that the plugin is incorrectly detecting how the player dies. For example, if a player dies from a custom mob and fire, it should display the custom mob death message and not the vanilla "was burned when escaping" death message. It also happens with other sources, for example, if a player hits you and then a custom mob with a custom kill message kills you, it will just show the vanilla death message " was slained by ".