NullPointerException Server Crash
MorningSage opened this issue · 1 comments
Using the 1.12 version, the server crashes on a very specific set of conditions:
- the mob is an adult
- the mob has the sunburn ability
- the player with the morph is in the sun
- the player is wearing a breakable helmet
When the helmet eventually breaks, the server crashes. Looking at the code for the sunburn ability, it appears the reason for this is that the head armor slot item is replaced with a null object instead of an empty ItemStack. The server attempts to play a break sound based on the null object and fails.
If I’m not mistaken, this can be fixed by replacing the “null” on line 70 of “AbilitySunburn” with “ItemStack.EMPTY”