From aaf72f099046d621553e8bba156af8ab99a605b8 Mon Sep 17 00:00:00 2001 From: loki Date: Thu, 9 Apr 2026 12:43:31 +0200 Subject: [PATCH] Add extended debug logging for config path resolution --- .../dev/loki/loparkour/config/Option.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/dev/loki/loparkour/config/Option.java b/src/main/java/dev/loki/loparkour/config/Option.java index 3d38c94..22e8903 100644 --- a/src/main/java/dev/loki/loparkour/config/Option.java +++ b/src/main/java/dev/loki/loparkour/config/Option.java @@ -261,15 +261,24 @@ public class Option { String parent = "default-values." + option.path; OPTIONS_ENABLED.put(option, Config.CONFIG.getBoolean(parent + ".enabled")); - if (Config.CONFIG.isPath(parent + ".default")) { - Object value = Config.CONFIG.get(parent + ".default"); + String defaultPath = parent + ".default"; + if (Config.CONFIG.isPath(defaultPath)) { + Object value = Config.CONFIG.get(defaultPath); - // Debug logging for LANG option + // Debug logging 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)); + } } } }