From 6e0f0e43275e3fc1b11b064b8f715561cc183f02 Mon Sep 17 00:00:00 2001 From: loki Date: Thu, 9 Apr 2026 13:00:32 +0200 Subject: [PATCH] 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. --- src/main/java/dev/loki/loparkour/config/Option.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/dev/loki/loparkour/config/Option.java b/src/main/java/dev/loki/loparkour/config/Option.java index 22e8903..efb7626 100644 --- a/src/main/java/dev/loki/loparkour/config/Option.java +++ b/src/main/java/dev/loki/loparkour/config/Option.java @@ -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