From c41938ada25c65aaecf48590f14c9cee73bc0d4d Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 1 Sep 2022 21:57:04 +0900 Subject: [PATCH] Fix potential unhandled exception --- .../burnedkirby/TurnBasedMinecraft/common/OtherModHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/OtherModHandler.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/OtherModHandler.java index 0ffdf21..d0e6396 100644 --- a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/OtherModHandler.java +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/OtherModHandler.java @@ -73,6 +73,8 @@ public class OtherModHandler { TurnBasedMinecraftMod.logger.warn("Failed to invoke NpcAPI.events(), InvocationTargetException!"); } catch (IllegalAccessException e) { TurnBasedMinecraftMod.logger.warn("Failed to invoke NpcAPI.events(), IllegalAccessException!"); + } catch (ClassCastException e) { + TurnBasedMinecraftMod.logger.warn("Failed to cast NpcAPI.events(), ClassCastException!"); } if (customNPCsEventBus == null) { break;