mfnalex / ChestSort

Best sorting plugin for Minecraft / Spigot 1.14+
https://www.chestsort.de
GNU General Public License v3.0
90 stars 35 forks source link

When a player has a ItemJoin item in inventory, its spams in the console an error #167

Closed iSeitan closed 1 year ago

iSeitan commented 1 year ago

Used ChestSort version ChestSort-13.5.1

Used Spigot version paper-1.19.3-373

Other plugin used ItemJoin https://www.spigotmc.org/resources/itemjoin.12661/

Describe the bug Spam in console

[20:25:50 ERROR]: Could not pass event ChestSortEvent to ItemJoin v5.2.5-RELEASE-b850 java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?] at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?] at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?] at java.util.Objects.checkIndex(Objects.java:359) ~[?:?] at java.util.ArrayList.get(ArrayList.java:427) ~[?:?] at me.RockinChaos.itemjoin.listeners.plugins.ChestSortAPI.onChestSortEvent(ChestSortAPI.java:41) ~[ItemJoin.jar:?] at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:git-Paper-373] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:672) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at de.jeff_media.chestsort.handlers.ChestSortOrganizer.sortInventory(ChestSortOrganizer.java:522) ~[ChestSort-13.5.1.jar:?] at de.jeff_media.chestsort.handlers.ChestSortOrganizer.sortInventory(ChestSortOrganizer.java:489) ~[ChestSort-13.5.1.jar:?] at de.jeff_media.chestsort.listeners.ChestSortListener.onLeftClickChest(ChestSortListener.java:102) ~[ChestSort-13.5.1.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1627.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:git-Paper-373] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:672) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:546) ~[paper-1.19.3.jar:git-Paper-373] at org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:503) ~[paper-1.19.3.jar:git-Paper-373] at org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:498) ~[paper-1.19.3.jar:git-Paper-373] at org.bukkit.craftbukkit.v1_19_R2.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:493) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.server.level.ServerPlayerGameMode.handleBlockBreakAction(ServerPlayerGameMode.java:198) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handlePlayerAction(ServerGamePacketListenerImpl.java:1871) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.handle(ServerboundPlayerActionPacket.java:42) ~[?:?] at net.minecraft.network.protocol.game.ServerboundPlayerActionPacket.a(ServerboundPlayerActionPacket.java:15) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1341) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1318) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1311) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1389) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[paper-1.19.3.jar:git-Paper-373] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-373] at java.lang.Thread.run(Thread.java:833) ~[?:?]

To Reproduce use chestsort when having an itemjoin in inventory

mfnalex commented 1 year ago

This is not a ChestSort bug, but caused by ItemJoin, specifically me.RockinChaos.itemjoin.listeners.plugins.ChestSortAPI line 41. Please report it to the ItemJoin author.