Add extended debug logging for config path resolution
This commit is contained in:
parent
f61a2455ea
commit
aaf72f0990
1 changed files with 14 additions and 5 deletions
|
|
@ -261,15 +261,24 @@ public class Option {
|
||||||
String parent = "default-values." + option.path;
|
String parent = "default-values." + option.path;
|
||||||
OPTIONS_ENABLED.put(option, Config.CONFIG.getBoolean(parent + ".enabled"));
|
OPTIONS_ENABLED.put(option, Config.CONFIG.getBoolean(parent + ".enabled"));
|
||||||
|
|
||||||
if (Config.CONFIG.isPath(parent + ".default")) {
|
String defaultPath = parent + ".default";
|
||||||
Object value = Config.CONFIG.get(parent + ".default");
|
if (Config.CONFIG.isPath(defaultPath)) {
|
||||||
|
Object value = Config.CONFIG.get(defaultPath);
|
||||||
|
|
||||||
// Debug logging for LANG option
|
// Debug logging
|
||||||
if (option == ParkourOption.LANG) {
|
if (option == ParkourOption.LANG) {
|
||||||
LoParkour.getPlugin().getLogger().info("LANG option: path=" + parent + ".default, value=" + value + ", type=" + (value != null ? value.getClass().getSimpleName() : "null"));
|
LoParkour.getPlugin().getLogger().info("LANG option: path=" + defaultPath + ", value=" + value + ", type=" + (value != null ? value.getClass().getSimpleName() : "null"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value != null) OPTIONS_DEFAULTS.put(option, String.valueOf(value));
|
if (value != null) {
|
||||||
|
OPTIONS_DEFAULTS.put(option, String.valueOf(value));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Debug: path not found
|
||||||
|
if (option == ParkourOption.LANG) {
|
||||||
|
LoParkour.getPlugin().getLogger().warning("LANG default path not found: " + defaultPath);
|
||||||
|
LoParkour.getPlugin().getLogger().warning("Available keys: " + Config.CONFIG.fileConfiguration.getKeys(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue