From 5178f1f48f2262cdbe60a9422b0d6d37b4677848 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 8 Jul 2021 22:09:52 +0200 Subject: [PATCH] CMDoS because Brigadier --- .../src/de/steamwar/command/SWCommandBrigadier.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandBrigadier.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandBrigadier.java index ecad6b3..92e131a 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandBrigadier.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandBrigadier.java @@ -295,7 +295,9 @@ class SWCommandBrigadier implements SWCommandInterface { private ArgumentType getArgumentType(Parameter parameter, Class parameterType, TypeMapper typeMapper) { ArgumentType argumentType; - if (parameterType == int.class || parameterType == Integer.class) { + if (parameterType == boolean.class || parameterType == Boolean.class) { + argumentType = BoolArgumentType.bool(); + } else if (parameterType == int.class || parameterType == Integer.class) { SWCommand.IntRange intRange = parameter.getAnnotation(SWCommand.IntRange.class); if (intRange != null) { argumentType = IntegerArgumentType.integer(intRange.min(), intRange.max());