From 671a03ab863afcc4a496d225d92a166c58119fba Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Sat, 12 Mar 2022 12:57:15 -0600 Subject: [PATCH] - Delay the login task by another tick so that the player's locale has been determined on the server. - Closes https://github.com/TownyAdvanced/Towny/issues/5802 --- pom.xml | 2 +- resources/changelog.txt | 4 +++- .../bukkit/TownyChat/listener/TownyChatPlayerListener.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b019029..d88f0bc 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ com.palmergames.bukkit TownyChat jar - 0.96 + 0.97 diff --git a/resources/changelog.txt b/resources/changelog.txt index 9b3eae7..d9af095 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -404,4 +404,6 @@ v0.96: - Display invalid subcommand message when /ch is used with an invalid subcommand. - Replace the splitter for channels saved in metadata with the , symbol. v0.97: - - Fix the display_channel_join_message_on_joining_the_server option in the config not being used. \ No newline at end of file + - Fix the display_channel_join_message_on_joining_the_server option in the config not being used. + - Delay the login task by another tick so that the player's locale has been determined on the server. + - Closes https://github.com/TownyAdvanced/Towny/issues/5802 \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/listener/TownyChatPlayerListener.java b/src/com/palmergames/bukkit/TownyChat/listener/TownyChatPlayerListener.java index 0b0ee78..68a1a10 100644 --- a/src/com/palmergames/bukkit/TownyChat/listener/TownyChatPlayerListener.java +++ b/src/com/palmergames/bukkit/TownyChat/listener/TownyChatPlayerListener.java @@ -40,7 +40,7 @@ public class TownyChatPlayerListener implements Listener { @EventHandler(priority = EventPriority.LOW) public void onPlayerJoin(final PlayerJoinEvent event) { - Bukkit.getScheduler().runTaskLater(plugin, () -> loginPlayer(event.getPlayer()), 1l); + Bukkit.getScheduler().runTaskLater(plugin, () -> loginPlayer(event.getPlayer()), 2l); }