Morph

Morph

22M Downloads

NullPointerException Server Crash

MorningSage opened this issue · 1 comments

commented

Using the 1.12 version, the server crashes on a very specific set of conditions:

  1. the mob is an adult
  2. the mob has the sunburn ability
  3. the player with the morph is in the sun
  4. 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”

commented

Thanks for the tip! I've tried to fix it in 7.2.1. Will be closing this in the meantime, feel free to reopen if it's not fixed.