SteamWar/SpigotCore
Archiviert
13
0

Fix stuff
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-05-21 16:28:18 +02:00
Ursprung f8436026e2
Commit 298aa9d3de
2 geänderte Dateien mit 7 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -334,7 +334,7 @@ public class SQLProvider implements Provider {
String dbLocale = rs.getString("Locale");
Locale locale = null;
if (dbLocale != null) {
locale = new Locale(dbLocale);
locale = Locale.forLanguageTag(dbLocale);
}
return new SteamwarUser(rs.getInt("id"), UUID.fromString(rs.getString("UUID")), rs.getString("UserName"), UserGroup.getUsergroup(rs.getString("UserGroup")), rs.getInt("Team"), rs.getBoolean("Bedrock"), locale);
}

Datei anzeigen

@ -42,10 +42,9 @@ public class SteamwarUser {
}
public static void invalidate(int userId) {
if (!byId.containsKey(userId))
SteamwarUser user = byId.remove(userId);
if (user == null)
return;
SteamwarUser user = byId.get(userId);
byId.remove(userId);
byName.remove(user.getUserName());
byUUID.remove(user.getUUID());
}
@ -98,13 +97,11 @@ public class SteamwarUser {
public Locale getLocale() {
Locale locale = this.locale;
if (locale == null) {
if (locale == null)
locale = WorldOfColorWrapper.impl.getLocale(Bukkit.getPlayer(uuid));
}
if (locale == null) {
locale = Locale.getDefault();
}
return locale;
if (locale != null)
return locale;
return Locale.getDefault();
}
public static SteamwarUser get(String userName){