mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-21 18:15:32 +01:00
parent
9fcd86fd43
commit
2d11b996ff
@ -67,7 +67,12 @@ public class BukkitLang {
|
||||
if (player == null) {
|
||||
return get(key);
|
||||
}
|
||||
String locale= player.getLocale();
|
||||
String locale;
|
||||
try {
|
||||
locale = player.getLocale();
|
||||
} catch (NoSuchMethodError e) {
|
||||
locale = player.spigot().getLocale();
|
||||
}
|
||||
final int separator = locale.indexOf("_");
|
||||
if (separator == -1) {
|
||||
return defaultLang.containsKey(key) ? BukkitFormatToken.convertString(player, defaultLang.get(key)) : "NULL";
|
||||
|
Loading…
Reference in New Issue
Block a user