Console Error When Using Placeholder for Custom Stat in MythicMobs
Summary
When I attack a mob that has been set up as intended, an error appears in the console. However, the functionality still works correctly. The issue is that the console error message is bothersome.
Steps to reproduce
- Define a custom stat in stats.yml.
- Set the ARMOR_DE value for the mob in mob.yml.
- Use a placeholder to retrieve the mob's ARMOR_DE in skill.yml.
- Spawn the mob in-game and use a skill to attack.
- Check the console for error messages.
Current behavior
The mob functions as intended.
However, when attacking the mob, an error appears in the console.
The error message indicates a NullPointerException, suggesting that the entity reference is null when attempting to process <target.stat.ARMOR_DE>.
Intended correct behavior
No error should appear in the console when attacking the mob.
Placeholders should function properly without issues.
Server log file
Debug log snippet
Proposed fixes
It could be caused by the entity reference becoming null at some point during placeholder processing.
Perhaps a fallback check should be implemented to ensure the entity is valid before using placeholders.