Skip to content

Commit 22929dc

Browse files
committed
fix crash on forge if plugin annotation missing the side value
closes AppliedEnergistics/Applied-Energistics-2#8169 (cherry picked from commit b90ac38)
1 parent 9965d32 commit 22929dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/forge/src/main/java/mcp/mobius/waila/forge/ForgePluginLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected void gatherPlugins() {
3131
if (annotation.annotationType().getClassName().equals(WAILA_PLUGIN)) {
3232
var id = (String) annotation.annotationData().get("id");
3333
var required = (String[]) annotation.annotationData().getOrDefault("required", new String[0]);
34-
var side = switch ((IPluginInfo.Side) annotation.annotationData().get("side")) {
34+
var side = switch ((IPluginInfo.Side) annotation.annotationData().getOrDefault("side", IPluginInfo.Side.BOTH)) {
3535
case CLIENT -> PluginSide.CLIENT;
3636
case SERVER -> PluginSide.DEDICATED_SERVER;
3737
case BOTH -> PluginSide.COMMON;

0 commit comments

Comments
 (0)