From 0e993d8f3e55d8c98862a41156470923f8c4bb8b Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 8 Dec 2021 17:22:02 +0100 Subject: [PATCH] Hotfix SubCommand --- SpigotCore_Main/src/de/steamwar/command/SubCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java index 0c1adb0..0db26e8 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java @@ -86,7 +86,7 @@ class SubCommand { name = mapper.value(); } else { SWCommand.StaticValue staticValue = parameter.getAnnotation(SWCommand.StaticValue.class); - if (parameter.getType() == String.class) { + if (staticValue != null && parameter.getType() == String.class) { arguments[i - 1] = SWCommandUtils.createMapper(staticValue.value()); guards[i - 1] = getGuardChecker(parameter, localGuardChecker); continue;