SteamWar/SpigotCore
Archiviert
13
0

CMDoS because Brigadier

Dieser Commit ist enthalten in:
yoyosource 2021-07-08 22:09:52 +02:00
Ursprung 45ddd8cb5a
Commit 5178f1f48f

Datei anzeigen

@ -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());