SteamWar/BungeeCore
Archiviert
13
2

Fix stuff
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-05-21 16:30:41 +02:00
Ursprung 5a129c6037
Commit 4f6bb722ad
2 geänderte Dateien mit 7 neuen und 19 gelöschten Zeilen

Datei anzeigen

@ -61,14 +61,6 @@ public class ConnectionListener extends BasicListener {
ProxiedPlayer player = event.getPlayer();
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
if (!user.isManualLocale()) {
Locale locale = player.getLocale();
if (locale == null) {
locale = Locale.getDefault();
}
user.setLocale(locale, false);
}
player.removeGroups("Admin", "team");
if(user.getUserGroup().isAdminGroup())

Datei anzeigen

@ -102,10 +102,8 @@ public class SteamwarUser {
}
String dbLocale = rs.getString("Locale");
if (dbLocale == null) {
locale = null;
} else {
locale = new Locale(dbLocale);
if (dbLocale != null) {
locale = Locale.forLanguageTag(dbLocale);
}
manualLocale = rs.getBoolean("ManualLocale");
@ -383,13 +381,11 @@ public class SteamwarUser {
public Locale getLocale() {
Locale locale = this.locale;
if (locale == null) {
if (locale == null)
locale = BungeeCord.getInstance().getPlayer(uuid).getLocale();
}
if (locale == null) {
locale = Locale.getDefault();
}
if (locale != null)
return locale;
return Locale.getDefault();
}
public boolean isManualLocale() {
@ -402,7 +398,7 @@ public class SteamwarUser {
boolean needsUpdate = !this.locale.equals(locale);
this.locale = locale;
this.manualLocale = manualLocale;
updateLocale.update(locale.getLanguage(), manualLocale, id);
updateLocale.update(locale.toString(), manualLocale, id);
if (needsUpdate)
new LocaleInvalidationPacket(id).send(getPlayer());
}