SteamWar/SpigotCore
Archiviert
13
0

Fix SWCommandUtils.generateCommandPart
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2021-12-09 23:23:41 +01:00
Ursprung 64c8d910c1
Commit 006754990c

Datei anzeigen

@ -191,7 +191,7 @@ public class SWCommandUtils {
SWCommand.Guard guard = parameter.getAnnotation(SWCommand.Guard.class);
if (guard != null) {
if (guard.value() != null) {
if (guard.value() != null && !guard.value().isEmpty()) {
return getGuardChecker(guard.value(), localGuardChecker);
}
return getGuardChecker(clazz.getTypeName(), localGuardChecker);
@ -200,6 +200,9 @@ public class SWCommandUtils {
}
private static GuardChecker getGuardChecker(String s, Map<String, GuardChecker> localGuardChecker) {
System.out.println(": " + s);
System.out.println(localGuardChecker);
System.out.println(GUARD_FUNCTIONS);
GuardChecker guardChecker = localGuardChecker.getOrDefault(s, GUARD_FUNCTIONS.getOrDefault(s, null));
if (guardChecker == null) {
throw new IllegalArgumentException("No guard found for " + s);