Fix stuff
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-05-10 10:48:39 +02:00
Ursprung 07e87b0c0e
Commit 128aca9697

Datei anzeigen

@ -127,7 +127,8 @@ public abstract class AbstractSWCommand<T> {
SWCommandUtils.getGUARD_FUNCTIONS().putIfAbsent(anno.value().getTypeName(), guardChecker);
}
});
}
for (Method method : methods) {
add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> {
if (!anno.help()) return;
if (parameters.length != 2) {
@ -142,8 +143,7 @@ public abstract class AbstractSWCommand<T> {
}
commandHelpList.add(new SubCommand(this, method, anno.value(), new HashMap<>(), localGuardChecker, true, null, anno.noTabComplete()));
});
}
for (Method method : methods) {
add(Register.class, method, i -> i > 0, true, null, (anno, parameters) -> {
if (anno.help()) return;
for (int i = 1; i < parameters.length; i++) {
@ -199,7 +199,7 @@ public abstract class AbstractSWCommand<T> {
commandSystemWarning(() -> "The method '" + method.toString() + "' is lacking the first parameter of type '" + clazz.getTypeName() + "'");
return;
}
if (returnType != null && !method.getReturnType().isAssignableFrom(returnType)) {
if (returnType != null && !returnType.isAssignableFrom(method.getReturnType())) {
commandSystemWarning(() -> "The method '" + method.toString() + "' is lacking the desired return type '" + returnType.getTypeName() + "'");
return;
}