CMDoS because Brigadier
Dieser Commit ist enthalten in:
Ursprung
45ddd8cb5a
Commit
5178f1f48f
@ -295,7 +295,9 @@ class SWCommandBrigadier implements SWCommandInterface {
|
|||||||
|
|
||||||
private ArgumentType<?> getArgumentType(Parameter parameter, Class<?> parameterType, TypeMapper<?> typeMapper) {
|
private ArgumentType<?> getArgumentType(Parameter parameter, Class<?> parameterType, TypeMapper<?> typeMapper) {
|
||||||
ArgumentType<?> argumentType;
|
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);
|
SWCommand.IntRange intRange = parameter.getAnnotation(SWCommand.IntRange.class);
|
||||||
if (intRange != null) {
|
if (intRange != null) {
|
||||||
argumentType = IntegerArgumentType.integer(intRange.min(), intRange.max());
|
argumentType = IntegerArgumentType.integer(intRange.min(), intRange.max());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren