Could not pass event CraftItemEvent to CoreProtect v21.3
zhirchik opened this issue ยท 5 comments
Start server on Magma 1.18.2, next message is spamming in console regularly:
[Server thread/ERROR] [Minecraft/]: Could not pass event CraftItemEvent to CoreProtect v21.3
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:293) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:classloading}
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:79) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:classloading}
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:mixin,re:classloading,re:mixin,re:mixin,re:mixin}
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:595) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:classloading}
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:582) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:classloading}
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_5914_(ServerGamePacketListenerImpl.java:2138) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:expandability.mixins.json:swimming.server.ServerGamePacketListenerImplMixin,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.m_5797_(ServerboundContainerClickPacket.java:56) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:classloading}
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.m_5797_(ServerboundContainerClickPacket.java:12) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:classloading}
at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:26) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:classloading}
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:classloading,re:mixin}
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,re:computing_frames,re:classloading,re:mixin}
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:1022) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:133) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:1005) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:999) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:1102) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:880) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:257) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:A,re:mixin,pl:accesstransformer:B}
at java.lang.Thread.run(Thread.java:1589) [?:?] {re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin}
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.player.Player.getBukkitEntity()" because "this.owner" is null
at net.minecraft.world.inventory.CraftingContainer.getLocation(CraftingContainer.java:70) ~[server-1.18.2-20220404.173914-srg.jar%2392!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
at org.bukkit.craftbukkit.v1_18_R2.inventory.CraftInventory.getLocation(CraftInventory.java:525) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:classloading}
at net.coreprotect.listener.player.CraftItemListener.playerCraftItem(CraftItemListener.java:174) ~[?:?] {}
at net.coreprotect.listener.player.CraftItemListener.onCraftItem(CraftItemListener.java:194) ~[?:?] {}
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?] {}
at java.lang.reflect.Method.invoke(Method.java:578) ~[?:?] {re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin,re:mixin}
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:291) ~[forge-1.18.2-40.2.1-universal.jar%2397!/:?] {re:classloading}
... 21 more
What I need to do to fix it?
Not really a CoreProtect issue, but I'll see about adding a check to resolve that error for you in the next release.
I assume it's fine to ignore in the meantime.
May actually not be fixable on our end, possibly a Magma issue. I did make a change which may help, but as I have no way to replicate this issue, it's not something I can test.
A new magna release is out, whixh hopefully adresses this issue.
It does fix the issue for me only thing left with CoreProtect and Magma is an InventoryClickEvent issue not sure if it warrants another issue though...
https://paste.gg/p/anonymous/34b67b807c854982864d9449a5861cd7
@Relaxing9 We recently also "fixed" the underlying issue of getInvenory(int) returning an exception. With magma this can happen as there are mods that expand inventory and add custom containers that have lots of slots, that bukkit just cannot handle.
You will still see errors about the slot index accessed being larger than expected, but the plugins will no longer receive an exception when they don't expect one.