mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 23:26:11 +01:00
parent
9fcd86fd43
commit
2d11b996ff
@ -67,7 +67,12 @@ public class BukkitLang {
|
|||||||
if (player == null) {
|
if (player == null) {
|
||||||
return get(key);
|
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("_");
|
final int separator = locale.indexOf("_");
|
||||||
if (separator == -1) {
|
if (separator == -1) {
|
||||||
return defaultLang.containsKey(key) ? BukkitFormatToken.convertString(player, defaultLang.get(key)) : "NULL";
|
return defaultLang.containsKey(key) ? BukkitFormatToken.convertString(player, defaultLang.get(key)) : "NULL";
|
||||||
|
Loading…
Reference in New Issue
Block a user