Fix reflect error
This commit is contained in:
parent
0d903d23b0
commit
fdc0d31632
@ -37,6 +37,7 @@ public class I18NUtils {
|
|||||||
try {
|
try {
|
||||||
Object spigot = spigotMethod.invoke(player);
|
Object spigot = spigotMethod.invoke(player);
|
||||||
Method spigotGetLocaleMethod = spigot.getClass().getMethod("getLocale");
|
Method spigotGetLocaleMethod = spigot.getClass().getMethod("getLocale");
|
||||||
|
spigotGetLocaleMethod.setAccessible(true);
|
||||||
|
|
||||||
return ((String) spigotGetLocaleMethod.invoke(spigot)).toLowerCase();
|
return ((String) spigotGetLocaleMethod.invoke(spigot)).toLowerCase();
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user