mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
fix errors with spigot specifically.
use paper folks.
This commit is contained in:
+8
-2
@@ -132,8 +132,10 @@ public class ConfigCache {
|
||||
if (commands.contains(cmd)) continue;
|
||||
commands.add(cmd);
|
||||
}
|
||||
|
||||
List<String> subCommands = section.getStringList(id + ".subcommands");
|
||||
List<String> subCommands = new ArrayList<>();
|
||||
for (String subCmd : section.getStringList(id + ".subcommands")) {
|
||||
subCommands.add(String.valueOf(subCmd));
|
||||
}
|
||||
String customCommandDeniedMessage = section.getString(id + ".custom_command_denied_message");
|
||||
return new CWGroup(id, commands, subCommands, customCommandDeniedMessage);
|
||||
}
|
||||
@@ -148,6 +150,10 @@ public class ConfigCache {
|
||||
}
|
||||
|
||||
private void warn(String log) {
|
||||
if (logger == null) {
|
||||
System.out.println("WARNING: "+log);
|
||||
return;
|
||||
}
|
||||
if (logger instanceof org.slf4j.Logger) {
|
||||
((org.slf4j.Logger) logger).warn(log);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user