]> git.seodisparate.com - TurnBasedMinecraftMod/commitdiff
Fix potential unhandled exception
authorStephen Seo <seo.disparate@gmail.com>
Thu, 1 Sep 2022 12:57:04 +0000 (21:57 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Thu, 1 Sep 2022 12:57:04 +0000 (21:57 +0900)
src/main/java/com/burnedkirby/TurnBasedMinecraft/common/OtherModHandler.java

index 0ffdf21306e61693e755b62748e49639e15453fc..d0e63962abf8a7ba7b8c10e7111091655cf49844 100644 (file)
@@ -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;