From cfc17e249f5a5456b67548d2cc38a4f248ca1edb Mon Sep 17 00:00:00 2001 From: Dank074 Date: Thu, 16 Jan 2020 02:51:53 -0600 Subject: [PATCH] fixed NumberFormatException in totem extradata --- .../items/interactions/totems/InteractionTotemHead.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemHead.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemHead.java index 65036015..b0e63eb8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemHead.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemHead.java @@ -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); }