aikar / commands

Java Command Dispatch Framework - (Bukkit, Spigot, Paper, Sponge, Bungee, JDA, Velocity supported, generically usable anywhere)
https://acfspigot.emc.gs
MIT License
566 stars 147 forks source link

Error: `Can't read players locale` when a player join #407

Open HydrolienF opened 5 months ago

HydrolienF commented 5 months ago

Hi, I have this exception some time when a player join. I don't understand what cause it. I have this exception with different plugin that use co.aikar:acf-paper:0.5.1-SNAPSHOT included into the jar plugin with shadowJar. I have this exception on different server with paper, pufferfish and Folia in 1.20.2 and 1.20.4. Forcing to download dependencies again with ./gradlew assemble -U fix it, untill the next time it break again.

It look like to happend because gradle forget to add some acf language properties in the jar file.

[22:11:44 INFO]: [MvndiPvP] [ACF] Can't read players locale, you will be unable to automatically detect players language. Only Bukkit 1.7+ is supported for this.
[22:11:44 INFO]: [MvndiPvP] [ACF] java.lang.NoSuchFieldException: locale
[22:11:44 INFO]: [MvndiPvP] [ACF]       at java.base/java.lang.Class.getDeclaredField(Class.java:2782)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at MvndiPvP-2.2.9.jar//net.mvndicraft.mvndipvp.lib.co.aikar.commands.BukkitCommandManager.readPlayerLocale(BukkitCommandManager.java:325)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at MvndiPvP-2.2.9.jar//net.mvndicraft.mvndipvp.lib.co.aikar.commands.ACFBukkitListener.onPlayerJoin(ACFBukkitListener.java:57)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at io.papermc.paper.plugin.manager.PaperEventManager.callEvent()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617)
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.players.PlayerList.a()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.a()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.a()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.a()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$0()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.TickTask.run()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.util.thread.IAsyncTaskHandler.d()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.b()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.d()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.util.thread.IAsyncTaskHandler.x()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.bl()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.x()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.util.thread.IAsyncTaskHandler.c()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.w_()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.w()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at net.minecraft.server.MinecraftServer.lambda$spin$0()
[22:11:44 INFO]: [MvndiPvP] [ACF]       at java.base/java.lang.Thread.run(Thread.java:1583)
[22:11:44 INFO]: PetitMulot joined the game
HydrolienF commented 5 months ago

I still get that error on 1.20.6 if it matter. By the way, I'm building on Windows.