diff --git a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java index e32dc38..9496d8c 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java @@ -89,6 +89,9 @@ class SubCommand { private GuardChecker getGuardChecker(Parameter parameter, Map 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");