Skip to content

Commit

Permalink
fix crash on forge if plugin annotation missing the side value
Browse files Browse the repository at this point in the history
closes AppliedEnergistics/Applied-Energistics-2#8169

(cherry picked from commit b90ac38)
  • Loading branch information
deirn committed Aug 31, 2024
1 parent ce981a9 commit 06824cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 06824cf

Please sign in to comment.