This code should not raise NullPointerException
if ( helmet != null ) {
Float helmetArmor = helmetValues.get(helmet.getType();
if ( helmetArmor != null ) {
armorValue += helmetArmor ;
}
}
Maybe your player has not helmet?
1
solved HashMap get method returns NullPointerException