Artillex-Studios / AxMinions

MIT License
10 stars 12 forks source link

InventoryClick Error on Spigot 1.21 #21

Open Nat392 opened 1 month ago

Nat392 commented 1 month ago

Hello,

I'm contacting you because I'm experiencing an error on your plugin when I click on the item to change the direction of the minions.

Here is the error: image


Could not pass event InventoryClickEvent to AxMinions v1.0.11
org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:601) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:588) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2763) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:71) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:14) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$0(PlayerConnectionUtils.java:35) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:162) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1270) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:203) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.util.thread.IAsyncTaskHandler.B(SourceFile:136) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.bv(MinecraftServer.java:1249) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.B(MinecraftServer.java:1242) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.util.thread.IAsyncTaskHandler.b(SourceFile:145) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1207) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.v_(MinecraftServer.java:1214) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1078) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.IllegalAccessError: class com.artillexstudios.axminions.libs.axapi.nms.v1_21_R1.items.WrappedItemStack tried to access field org.bukkit.craftbukkit.v1_21_R1.inventory.CraftItemStack.handle (com.artillexstudios.axminions.libs.axapi.nms.v1_21_R1.items.WrappedItemStack is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @13bbccc7; org.bukkit.craftbukkit.v1_21_R1.inventory.CraftItemStack is in unnamed module of loader java.net.URLClassLoader @79fc0f2f)
    at com.artillexstudios.axminions.libs.axapi.nms.v1_21_R1.items.WrappedItemStack.<init>(WrappedItemStack.java:17) ~[?:?]
    at com.artillexstudios.axminions.libs.axapi.nms.v1_21_R1.NMSHandler.wrapItem(NMSHandler.java:174) ~[?:?]
    at com.artillexstudios.axminions.libs.axapi.items.WrappedItemStack.wrap(WrappedItemStack.java:12) ~[?:?]
    at com.artillexstudios.axminions.minions.Minion.setTool(Minion.kt:448) ~[?:?]
    at com.artillexstudios.axminions.api.minions.Minion$DefaultImpls.setTool$default(Minion.kt:49) ~[?:?]
    at com.artillexstudios.axminions.listeners.MinionInventoryListener.onInventoryClickEvent(MinionInventoryListener.kt:84) ~[?:?]
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
    at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    ... 21 more
Nat392 commented 1 month ago

Hi, any news ?

AverageGithub commented 1 month ago

Could you please try with this jar? https://cdn.discordapp.com/attachments/1262650237353332736/1262816423013646479/AxMinions-1.0.12-all.jar?ex=6699f331&is=6698a1b1&hm=22c67c12a06ffd32ca8632344f6b85aad778385b9f7f7b5211a05e15eba18f23&

Nat392 commented 1 month ago

Could you please try with this jar? https://cdn.discordapp.com/attachments/1262650237353332736/1262816423013646479/AxMinions-1.0.12-all.jar?ex=6699f331&is=6698a1b1&hm=22c67c12a06ffd32ca8632344f6b85aad778385b9f7f7b5211a05e15eba18f23&

Hi, I have an error with this version of the plugin at server load. image