Dieser Commit ist enthalten in:
Ursprung
128aca9697
Commit
0f03b57e43
@ -141,7 +141,7 @@ public abstract class AbstractSWCommand<T> {
|
||||
commandSystemWarning(() -> "The method '" + method.toString() + "' is lacking the varArgs parameters of type '" + String.class.getTypeName() + "' as last Argument");
|
||||
return;
|
||||
}
|
||||
commandHelpList.add(new SubCommand(this, method, anno.value(), new HashMap<>(), localGuardChecker, true, null, anno.noTabComplete()));
|
||||
commandHelpList.add(new SubCommand<>(this, method, anno.value(), new HashMap<>(), localGuardChecker, true, null, anno.noTabComplete()));
|
||||
});
|
||||
|
||||
add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> {
|
||||
@ -162,8 +162,9 @@ public abstract class AbstractSWCommand<T> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
commandList.add(new SubCommand(this, method, anno.value(), localTypeMapper, localGuardChecker, false, anno.description(), anno.noTabComplete()));
|
||||
commandList.add(new SubCommand<>(this, method, anno.value(), localTypeMapper, localGuardChecker, false, anno.description(), anno.noTabComplete()));
|
||||
});
|
||||
}
|
||||
|
||||
this.commandList.sort((o1, o2) -> {
|
||||
int compare = Integer.compare(-o1.subCommand.length, -o2.subCommand.length);
|
||||
@ -182,7 +183,6 @@ public abstract class AbstractSWCommand<T> {
|
||||
o2.method.getDeclaringClass() == AbstractSWCommand.class ? 1 : 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ public abstract class AbstractSWCommand<T> {
|
||||
private List<Method> methods() {
|
||||
List<Method> methods = new ArrayList<>();
|
||||
Class<?> current = getClass();
|
||||
while (current.getSuperclass() != AbstractSWCommand.class) {
|
||||
while (current != AbstractSWCommand.class) {
|
||||
methods.addAll(Arrays.asList(current.getDeclaredMethods()));
|
||||
current = current.getSuperclass();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren