From a47f2e46fef60be6b8bb67b88712b148d9ffb96a Mon Sep 17 00:00:00 2001 From: LlmDl Date: Thu, 17 Aug 2023 16:10:19 -0500 Subject: [PATCH] Fix worlds section not generating when per-world is set to true in the chatconfig.yml. --- pom.xml | 2 +- resources/changelog.txt | 4 +++- src/com/palmergames/bukkit/TownyChat/config/ChatSettings.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index e08d0a0..888e050 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ com.palmergames.bukkit TownyChat jar - 0.108 + 0.109 diff --git a/resources/changelog.txt b/resources/changelog.txt index c9f9c09..9d13633 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -467,4 +467,6 @@ v0.107: - Handle knock-off Essentials plugins fooling TownyChat into hooking the real EssentialsX. v0.108: - Fix help menus not being coloured properly. - - Update min. Towny version to 0.99.5.0. \ No newline at end of file + - Update min. Towny version to 0.99.5.0. +v0.109: + - Fix worlds section not generating when per-world is set to true in the chatconfig.yml. \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/config/ChatSettings.java b/src/com/palmergames/bukkit/TownyChat/config/ChatSettings.java index a2a27e8..d6502b8 100644 --- a/src/com/palmergames/bukkit/TownyChat/config/ChatSettings.java +++ b/src/com/palmergames/bukkit/TownyChat/config/ChatSettings.java @@ -265,7 +265,7 @@ public class ChatSettings { } private static String getOrDefault(String configPath, ChatConfigNodes channelNode) { - return (String) chatConfig.get(configPath != null ? configPath : channelNode.getDefault()); + return String.valueOf(chatConfig.get(configPath, channelNode.getDefault())); } private static void addWorldFormat(WorldFormat format) {