Techguns

Techguns

9M Downloads

Ignoring check instance and casting causes ClassCastException

gabizou opened this issue ยท 0 comments

commented

In relation to SpongePowered/SpongeForge#2139, GenericArmor is casting to EntityPlayerMP, even though there's an instance check. This is causing spam exceptions when players are taking damage with this sort of armor.

I'm not fully understanding the point of the instance check, but even an IDE will flag this as a warning as shown below:
screen shot 2018-05-11 at 1 25 27 pm