SteamWar/SpigotCore
Archiviert
13
0

Add SubCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2021-11-15 23:55:37 +01:00
Ursprung 373612f24b
Commit b1f7f205ad

Datei anzeigen

@ -89,6 +89,9 @@ class SubCommand {
private GuardChecker getGuardChecker(Parameter parameter, Map<String, GuardChecker> localGuardChecker) {
SWCommand.Guard guard = parameter.getAnnotation(SWCommand.Guard.class);
if (guard != null) {
if (guard.value() == null || guard.value().isEmpty()) {
return GUARD_FUNCTIONS.getOrDefault(parameter.getType().getTypeName(), null);
}
GuardChecker current = localGuardChecker.getOrDefault(guard.value(), GUARD_FUNCTIONS.getOrDefault(guard.value(), null));
if (guardChecker == null) {
Bukkit.getLogger().log(Level.WARNING, () -> "The guard checker with name '" + guard.value() + "' is neither a local guard checker nor a global one");