Fix reflect error

This commit is contained in:
Dreeam 2024-05-30 00:27:38 +08:00
parent 0d903d23b0
commit fdc0d31632
No known key found for this signature in database
GPG Key ID: 0998F8AFD8F667AB

View File

@ -37,6 +37,7 @@ public class I18NUtils {
try {
Object spigot = spigotMethod.invoke(player);
Method spigotGetLocaleMethod = spigot.getClass().getMethod("getLocale");
spigotGetLocaleMethod.setAccessible(true);
return ((String) spigotGetLocaleMethod.invoke(spigot)).toLowerCase();
} catch (Exception ignored) {