mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
additional warnings for misconfiguration
This commit is contained in:
+5
-1
@@ -136,7 +136,11 @@ public class ConfigCache {
|
||||
}
|
||||
List<String> subCommands = new ArrayList<>();
|
||||
for (String subCmd : section.getStringList(id + ".subcommands")) {
|
||||
subCommands.add(String.valueOf(subCmd));
|
||||
if (!subCmd.contains(" ")) {
|
||||
warn("CommandWhitelist - \"" + subCmd + "\" is not a subcommand. Skipping it.");
|
||||
continue;
|
||||
}
|
||||
subCommands.add(subCmd);
|
||||
}
|
||||
String customCommandDeniedMessage = section.getString(id + ".custom_command_denied_message");
|
||||
return new CWGroup(id, commands, subCommands, customCommandDeniedMessage);
|
||||
|
||||
Reference in New Issue
Block a user