fixed NumberFormatException in totem extradata

This commit is contained in:
Dank074 2020-01-16 02:51:53 -06:00
parent dab3f8e2c3
commit cfc17e249f

View File

@ -22,7 +22,12 @@ public class InteractionTotemHead extends InteractionDefault {
}
public TotemType getTotemType() {
int extraData = Integer.parseInt(this.getExtradata());
int extraData;
try {
extraData = Integer.parseInt(this.getExtradata());
} catch(NumberFormatException ex) {
extraData = 0;
}
if(extraData < 3) {
return TotemType.fromInt(extraData + 1);
}