SteamWar/SpigotCore
Archiviert
13
0

Fix stuff
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-05-21 13:23:43 +02:00
Ursprung 22e691dcb8
Commit 6eb72a3aa2
2 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -75,12 +75,7 @@ public class Message {
} }
private Locale getLocale(Player player){ private Locale getLocale(Player player){
Locale locale = SteamwarUser.get(player).getLocale(); return SteamwarUser.get(player).getLocale();
if (locale == null)
locale = WorldOfColorWrapper.impl.getLocale(player);
if (locale == null)
locale = Locale.getDefault();
return locale;
} }
/* Send a message to one player */ /* Send a message to one player */

Datei anzeigen

@ -20,6 +20,7 @@
package de.steamwar.sql; package de.steamwar.sql;
import de.steamwar.core.Core; import de.steamwar.core.Core;
import de.steamwar.core.WorldOfColorWrapper;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -96,6 +97,13 @@ public class SteamwarUser {
} }
public Locale getLocale() { public Locale getLocale() {
Locale locale = this.locale;
if (locale == null) {
locale = WorldOfColorWrapper.impl.getLocale(Bukkit.getPlayer(uuid));
}
if (locale == null) {
locale = Locale.getDefault();
}
return locale; return locale;
} }