mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
Fix player locale retrieval on Bukkit 1.8 (#2930)
This commit is contained in:
parent
0f63b024e4
commit
ad1ba3c126
@ -47,7 +47,7 @@ public final class PlayerLocaleUtil {
|
|||||||
Method legacyMethod = Player.Spigot.class.getMethod("getLocale");
|
Method legacyMethod = Player.Spigot.class.getMethod("getLocale");
|
||||||
function = player -> {
|
function = player -> {
|
||||||
try {
|
try {
|
||||||
return (String) legacyMethod.invoke(player);
|
return (String) legacyMethod.invoke(player.spigot());
|
||||||
} catch (ReflectiveOperationException e) {
|
} catch (ReflectiveOperationException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user