From 06824cfb318ca982e4f31ba4ff8a35bc718b4a25 Mon Sep 17 00:00:00 2001 From: deirn Date: Sun, 1 Sep 2024 00:30:33 +0700 Subject: [PATCH] fix crash on forge if plugin annotation missing the side value closes https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/8169 (cherry picked from commit b90ac38e344b398139cba4483129afb3b6f92aef) --- .../src/main/java/mcp/mobius/waila/forge/ForgePluginLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/forge/src/main/java/mcp/mobius/waila/forge/ForgePluginLoader.java b/platform/forge/src/main/java/mcp/mobius/waila/forge/ForgePluginLoader.java index b6594640..4375403e 100644 --- a/platform/forge/src/main/java/mcp/mobius/waila/forge/ForgePluginLoader.java +++ b/platform/forge/src/main/java/mcp/mobius/waila/forge/ForgePluginLoader.java @@ -31,7 +31,7 @@ protected void gatherPlugins() { if (annotation.annotationType().getClassName().equals(WAILA_PLUGIN)) { var id = (String) annotation.annotationData().get("id"); var required = (String[]) annotation.annotationData().getOrDefault("required", new String[0]); - var side = switch ((IPluginInfo.Side) annotation.annotationData().get("side")) { + var side = switch ((IPluginInfo.Side) annotation.annotationData().getOrDefault("side", IPluginInfo.Side.BOTH)) { case CLIENT -> PluginSide.CLIENT; case SERVER -> PluginSide.DEDICATED_SERVER; case BOTH -> PluginSide.COMMON;