From 5a129c6037729ef611ad1019bb6eda54bf56ad15 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 21 May 2022 13:25:07 +0200 Subject: [PATCH] Fix SteamwarUser --- src/de/steamwar/bungeecore/sql/SteamwarUser.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/de/steamwar/bungeecore/sql/SteamwarUser.java b/src/de/steamwar/bungeecore/sql/SteamwarUser.java index 6ca6b9e..44b93a5 100644 --- a/src/de/steamwar/bungeecore/sql/SteamwarUser.java +++ b/src/de/steamwar/bungeecore/sql/SteamwarUser.java @@ -26,6 +26,7 @@ import de.steamwar.bungeecore.commands.WebregisterCommand; import de.steamwar.bungeecore.comms.packets.LocaleInvalidationPacket; import de.steamwar.bungeecore.listeners.ConnectionListener; import de.steamwar.messages.ChatSender; +import net.md_5.bungee.BungeeCord; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.connection.PendingConnection; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -381,6 +382,13 @@ public class SteamwarUser { } public Locale getLocale() { + Locale locale = this.locale; + if (locale == null) { + locale = BungeeCord.getInstance().getPlayer(uuid).getLocale(); + } + if (locale == null) { + locale = Locale.getDefault(); + } return locale; }