Cannot complete trades on Paper
SlimeDog opened this issue ยท 3 comments
Preliminaries:
- Shopkeepers version:
Paper version 1.21-6-master@126f6d7
- PAPER version:
Paper version 1.21-6-master@126f6d7
- I have checked that my issue/question does not get answered by:
- The documentation.
- The FAQ.
- The Known Issues.
- I have checked all open and closed issues, but none seems to fit my issue/question.
Reproduction on a fresh and up-to-date PAPER server:
I was able
to reproduce my issue on a freshly set up and up-to-date PAPER server (currently Paper version 1.21-6-master@126f6d7
) with the latest version of Shopkeepers (currently Paper version 1.21-6-master@126f6d7
).
The issue:
Provide a detailed description of the issue and information on how to reproduce it.
Include:
- Description
-- Newly-created shopkeeper cannot complete trade - Step-by-step instructions on how to reproduce the issue.
- Install Paper 1.21-6.
- Install Shopkeepers 2.21.1-SNAPSHOT+64d3a6da (aka build 279)
- Start server
- Create shopkeeper
# This file is not intended to be manually modified! If you want to manually edit this file anyways, ensure that the server is not running currently a
nd that you have prepared a backup of this file.
data-version: 3|2|3953
'1':
uniqueId: a21d29f9-7e5b-4fce-8c0e-ff248b7998db
world: world_luckyblock
x: 0
y: 9
z: -4
yaw: 359.19467
type: admin
name: I sell zappers
object:
type: blaze
recipes:
'1':
resultItem:
==: org.bukkit.inventory.ItemStack
v: 3953
type: BLAZE_ROD
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: '{"text":"","extra":[{"text":"Bug Zapper","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"
aqua","bold":false}]}'
lore:
- '{"text":"","extra":["When in main hand:"]}'
- '{"text":"","extra":["+9 Attack Damage"]}'
item1:
==: org.bukkit.inventory.ItemStack
v: 3953
type: ENDER_PEARL
amount: 16
item2:
==: org.bukkit.inventory.ItemStack
v: 3953
type: FIRE_CHARGE
amount: 32
snapshots: []
- Observed behavior.
- Attempt trade
- Supply required items
- Note that
resultItem
cannot be transferred to inventory - Read generated error (see below)
- Expected behavior.
- Operable shopkeeper
- If items with special attributes are involved: Include instructions on how to create those items.
- Server logs (from server startup until issue). Consider enabling debug mode in the config for additional console output.
[14:40:15] [Server thread/ERROR]: Could not pass event InventoryClickEvent to Shopkeepers v2.21.1-SNAPSHOT+64d3a6da
java.lang.NullPointerException: Cannot read field "handle" because "stack" is null
at org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(CraftItemStack.java:97) ~[paper-1.21.jar:1.21-6-126f6d7]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.compat.v1_21_R1.NMSHandler.asNMSItemStack(NMSHandler.java:179) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.compat.v1_21_R1.NMSHandler.matches(NMSHandler.java:191) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.compat.api.NMSCallProvider.matches(NMSCallProvider.java:68) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.trading.TradingHandler.matches(TradingHandler.java:809) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.trading.TradingHandler.checkForTrade(TradingHandler.java:716) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.trading.TradingHandler.checkForTrade(TradingHandler.java:620) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.trading.TradingHandler.onInventoryClickLate(TradingHandler.java:402) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.UIHandler.informOnInventoryClickLate(UIHandler.java:364) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.UIHandler.informOnInventoryEventLate(UIHandler.java:269) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.ui.UIListener.onInventoryEventLate(UIListener.java:218) ~[Shopkeepers-2.21.1-b279.jar:?]
at Shopkeepers-2.21.1-b279.jar/com.nisovin.shopkeepers.util.bukkit.EventUtils.lambda$eventExecutor$0(EventUtils.java:76) ~[Shopkeepers-2.21.1-b279.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:1.21-6-126f6d7]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.21.jar:1.21-6-126f6d7]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.jar:1.21-6-126f6d7]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3122) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:36) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1478) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1456) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1449) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1408) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1415) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1260) ~[paper-1.21.jar:1.21-6-126f6d7]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329) ~[paper-1.21.jar:1.21-6-126f6d7]
at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]
- If modified from default: Plugin configurations.
diff plugins/Shopkeepers/config.yml plugins/Shopkeepers/releases/2.21.1/config.yml
425c425
< enable-sign-shops: false
---
> enable-sign-shops: true
427c427
< enable-sign-post-shops: false
---
> enable-sign-post-shops: true
429c429
< enable-hanging-sign-shops: false
---
> enable-hanging-sign-shops: true
- ... Anything else that might be useful to reproduce and identify the issue.
In my admittedly-limited test environment, as shown above, this issue is resolved with Shopkeepers-2.22.1-b282.