diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index c9b7f43..b212b00 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -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 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);