erikzimmermann / TradeSystem

A highly customizable, free and open-source Minecraft plugin for trading between players.
https://www.spigotmc.org/resources/trade-system-custom-layouts.58434/
MIT License
82 stars 48 forks source link

TradeProxy is not working with non-full inventories #370

Closed erikzimmermann closed 2 years ago

erikzimmermann commented 2 years ago

Describe the bug

[13:12:27 WARN]: [TradeSystem] Plugin TradeSystem v2.1.0 generated an exception whilst handling plugin message
java.lang.NullPointerException: Cannot invoke "de.codingair.tradesystem.lib.packetmanagement.utils.SerializedGeneric.getObject()" because "this.item" is null
        at de.codingair.tradesystem.proxy.packets.PlayerInventoryPacket.getItem(PlayerInventoryPacket.java:62) ~[?:?]
        at de.codingair.tradesystem.spigot.transfer.handlers.PlayerInventoryPacketHandler.process(PlayerInventoryPacketHandler.java:28) ~[?:?]
        at de.codingair.tradesystem.spigot.transfer.handlers.PlayerInventoryPacketHandler.process(PlayerInventoryPacketHandler.java:19) ~[?:?]
        at de.codingair.tradesystem.lib.packetmanagement.DataHandler.receive(DataHandler.java:187) ~[?:?]
        at de.codingair.tradesystem.lib.packetmanagement.variants.bytestream.OneWayStreamDataHandler.receive(OneWayStreamDataHandler.java:63) ~[?:?]
        at de.codingair.tradesystem.spigot.transfer.SpigotHandler.onPluginMessageReceived(SpigotHandler.java:59) ~[?:?]
        at org.bukkit.plugin.messaging.StandardMessenger.dispatchIncomingMessage(StandardMessenger.java:455) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:3236) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PacketPlayInCustomPayload.a(SourceFile:44) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PacketPlayInCustomPayload.a(SourceFile:9) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:55) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1339) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1332) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1308) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1152) ~[patched_1.16.5.jar:git-Purpur-1171]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1171]
        at java.lang.Thread.run(Thread.java:831) [?:?]