Revert change from 6afb92c, fixes #2241

This commit is contained in:
PikaMug 2024-07-02 05:09:02 -04:00
parent 9fcd86fd43
commit 2d11b996ff

View File

@ -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";