Force getString() for locale default to prevent Boolean parsing
Config.get() was returning Boolean true instead of String "en", causing locale lookup to fail. Now using getString() directly.
This commit is contained in:
parent
2f63b14d11
commit
6e0f0e4327
1 changed files with 5 additions and 4 deletions
|
|
@ -263,15 +263,16 @@ public class Option {
|
|||
|
||||
String defaultPath = parent + ".default";
|
||||
if (Config.CONFIG.isPath(defaultPath)) {
|
||||
Object value = Config.CONFIG.get(defaultPath);
|
||||
// Always read as String to avoid Boolean parsing issues
|
||||
String value = Config.CONFIG.getString(defaultPath);
|
||||
|
||||
// Debug logging
|
||||
if (option == ParkourOption.LANG) {
|
||||
LoParkour.getPlugin().getLogger().info("LANG option: path=" + defaultPath + ", value=" + value + ", type=" + (value != null ? value.getClass().getSimpleName() : "null"));
|
||||
LoParkour.getPlugin().getLogger().info("LANG option: path=" + defaultPath + ", value=" + value);
|
||||
}
|
||||
|
||||
if (value != null) {
|
||||
OPTIONS_DEFAULTS.put(option, String.valueOf(value));
|
||||
if (value != null && !value.isEmpty()) {
|
||||
OPTIONS_DEFAULTS.put(option, value);
|
||||
}
|
||||
} else {
|
||||
// Debug: path not found
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue