SteamWar/BungeeCore
Archiviert
13
2

Fix SteamwarUser
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-05-21 13:25:07 +02:00
Ursprung 8aed828f82
Commit 5a129c6037

Datei anzeigen

@ -26,6 +26,7 @@ import de.steamwar.bungeecore.commands.WebregisterCommand;
import de.steamwar.bungeecore.comms.packets.LocaleInvalidationPacket; import de.steamwar.bungeecore.comms.packets.LocaleInvalidationPacket;
import de.steamwar.bungeecore.listeners.ConnectionListener; import de.steamwar.bungeecore.listeners.ConnectionListener;
import de.steamwar.messages.ChatSender; import de.steamwar.messages.ChatSender;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.PendingConnection; import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@ -381,6 +382,13 @@ public class SteamwarUser {
} }
public Locale getLocale() { public Locale getLocale() {
Locale locale = this.locale;
if (locale == null) {
locale = BungeeCord.getInstance().getPlayer(uuid).getLocale();
}
if (locale == null) {
locale = Locale.getDefault();
}
return locale; return locale;
} }