From ad1ba3c126650a71dcb4cc7839bf69479d71d374 Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 19 Mar 2021 19:33:08 +0000 Subject: [PATCH] Fix player locale retrieval on Bukkit 1.8 (#2930) --- .../java/me/lucko/luckperms/bukkit/util/PlayerLocaleUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/util/PlayerLocaleUtil.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/util/PlayerLocaleUtil.java index 19f7af933..0c169b311 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/util/PlayerLocaleUtil.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/util/PlayerLocaleUtil.java @@ -47,7 +47,7 @@ public final class PlayerLocaleUtil { Method legacyMethod = Player.Spigot.class.getMethod("getLocale"); function = player -> { try { - return (String) legacyMethod.invoke(player); + return (String) legacyMethod.invoke(player.spigot()); } catch (ReflectiveOperationException e) { throw new RuntimeException(e); }