Add language via db #194
@ -75,12 +75,7 @@ public class Message {
|
||||
}
|
||||
|
||||
private Locale getLocale(Player player){
|
||||
Locale locale = SteamwarUser.get(player).getLocale();
|
||||
if (locale == null)
|
||||
locale = WorldOfColorWrapper.impl.getLocale(player);
|
||||
if (locale == null)
|
||||
locale = Locale.getDefault();
|
||||
return locale;
|
||||
return SteamwarUser.get(player).getLocale();
|
||||
}
|
||||
|
||||
/* Send a message to one player */
|
||||
|
@ -20,6 +20,7 @@
|
||||
package de.steamwar.sql;
|
||||
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.core.WorldOfColorWrapper;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -96,6 +97,13 @@ public class SteamwarUser {
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
Locale locale = this.locale;
|
||||
if (locale == null) {
|
||||
locale = WorldOfColorWrapper.impl.getLocale(Bukkit.getPlayer(uuid));
|
||||
|
||||
}
|
||||
if (locale == null) {
|
||||
Lixfel
hat
Bitte stattdessen ein != null return machen. Bitte stattdessen ein != null return machen.
|
||||
locale = Locale.getDefault();
|
||||
}
|
||||
return locale;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Das ist unnötig (Entweder in DB oder gibts gar keine Info)
s.o.