Tradeshop / TradeShop

Unique, new, powerful Minecraft TradeShop plugin!
https://tradeshop.github.io
Apache License 2.0
25 stars 11 forks source link

Error After Removing a Linked Chest #160

Open Hatsuharu33227 opened 11 months ago

Hatsuharu33227 commented 11 months ago

Stack trace

[04:33:38 ERROR]: Could not pass event PlayerInteractEvent to TradeShop v2.6.1-STABLE java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.Inventory.getStorageContents()" because "shopInventory" is null at org.shanerx.tradeshop.shop.Shop.updateFullTradeCount(Shop.java:607) ~[TradeShop-2.6.1-STABLE.jar:?] at org.shanerx.tradeshop.shop.Shop.saveShop(Shop.java:353) ~[TradeShop-2.6.1-STABLE.jar:?] at org.shanerx.tradeshop.shop.Shop.updateSide(Shop.java:1156) ~[TradeShop-2.6.1-STABLE.jar:?] at org.shanerx.tradeshop.shop.listeners.ShopTradeListener.onBlockInteract(ShopTradeListener.java:104) ~[TradeShop-2.6.1-STABLE.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor930.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:591) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:537) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:2015) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:37) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-196] 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:1338) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-196] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196] at java.lang.Thread.run(Thread.java:833) ~[?:?]

Plugin list

Paper Plugins:

Actions to reproduce (if known)

Steps:

  1. Create a tradeshop with a walled sign and a chest
  2. Complete with using /tradeshop create, /tradeshop addCost and /tradeshop addProduct
  3. Remove the chest which linked with tradeshop
  4. Click that sign and the console shows error

TradeShop version and Minecraft version (CraftBukkit/Spigot/Paper/...)

This server is running Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72) You are running the latest version Previous version: git-Paper-65 (MC: 1.20.1)

TradeShop v2.6.1-STABLE

Agreements

Other

Tried: Failed to create/edit that sign after restarting the server and remove the sign

KillerOfPie commented 11 months ago
  1. You shouldn't be editing trade signs. They update on their own, and any improper changes could have negative effects.
  2. Do you mean that you placed a sign and chest then used the create command, or did you create a sign with [trade] on the first line above a chest then use the create command on that?
  3. This probably is caused by issues related to https://github.com/Tradeshop/TradeShop/issues/159 and should be fixed in the latest dev build. You can try that out, but see my comment in the Ghost Tradeshop thread in the discord before trying that version.