From c447315b9eb80cdaef0e1f124e0db03081b3f86f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 2 Oct 2022 08:12:49 +0200 Subject: [PATCH] Hotbar deserialize fix --- .../steamwar/bausystem/features/hotbar/DefaultHotbar.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java b/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java index 9fdc9736..25760ccb 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java @@ -70,7 +70,11 @@ public class DefaultHotbar { if (yapionAnyType instanceof YAPIONValue) { hotbar[integer] = null; } else { - hotbar[integer] = (ItemStack) YAPIONDeserializer.deserialize((YAPIONObject) yapionAnyType); + try { + hotbar[integer] = YAPIONDeserializer.deserialize((YAPIONObject) yapionAnyType); + } catch (Exception e) { + hotbar[integer] = null; + } } }); return hotbar;