[Bug] Cant open npc shop's trade in 1.21
ItsDApples opened this issue · 11 comments
Preliminaries:
- Shopkeepers version:
Lastest Version
- Spigot version:
1.21
- 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 Spigot server:
I was able
to reproduce my issue on a freshly set up and up-to-date Spigot server (currently <Insert output of /version command on up-to-date Spigot server>
) with the latest version of Shopkeepers (currently <Insert latest tested Shopkeepers version>
), with no other plugins and with no kinds of other server or client mods.
The issue:
I created a npc shop use citizens and shopkeeper, and i can open the edit shop gui . but i cant open the trade gui. no console output
When i walk pass no edited shopkeepers , ill see the message only i click can see
no i set, but i just cant view the no trade message but i cant open the shop, when i reopen the edit menu , i can see my item in it
just for npc shop have this bug
Can you describe step by step how you created this NPC and how you setup the trades? Like, which commands did you use, etc.
Did you manually edit the NPC in some way? Can you try to reproduce this with a non-villager npc?
Not sure what the question/issue is, but the error message sould be quite clear: You cannot open the trading UI for shops without trades. Setup some trades inside the editor, and then try to open the shop again.
- use /shopkeepers npc
- when i near this shopkeepers , that no trade item message will display to me but i have not click this npc
- shift right click this npc and edit it with some item
- cant open this npc shop's trade gui
but when i try to create it in other type just like villager.
i still will see the no trade message when i near this npc , but i can edit it and open the trade gui
I am not able to reproduce this with Shopkeepers 2.23.0, Spigot 1.21.1, and Citizens 2.0.35-b3514, neither with player NPC shopkeepers, nor with villager NPC shopkeepers.
Make sure that your server and plugins are up-to-date, and then try reproducing the issue without other plugins involved. Also try without ViaVersion.
when i near this shopkeepers , that no trade item message will display to me but i have not click this npc
This aspect I do not understand yet. This sounds to me that maybe some third-party plugin or script is automatically trying to open some shopkeeper for you. So the shopkeeper it tries to open is a different one than the one you actually edit.
Its the debugs message
say Test Begin
[00:10:17 INFO]: [Not Secure] [Server] Test Begin
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (HAND) at PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] Ignoring InteractAtEntity event
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (HAND) with PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] UI session 'trading' started for player DApples_.
[00:10:19 INFO]: [Shopkeepers] Opening UI 'trading' ...
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (OFF_HAND) at PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] Ignoring InteractAtEntity event
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (OFF_HAND) with PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] Ignoring off-hand interaction
[00:10:19 INFO]: [Shopkeepers] Inventory event (InventoryCloseEvent): player=DApples_, view-type=MERCHANT, view-title=§2Shopkeeper
[00:10:19 INFO]: [Shopkeepers] Player DApples_ closed UI 'trading'.
[00:10:19 INFO]: [Shopkeepers] UI session 'trading' ended for player DApples_.
I have no idea what is causing this issue. But it appears as if some of those clicks aren't even detected.
Try to reproduce this without client side mods and with a fresh up-to-date Spigot server without any other plugins other than Shopkeepers and Spigot.
Additionally, you can also turn on debug mode (/shopkeeper debug
) and see if this logs any additional information to the console log when you try to interact with the shopkeeper.
Its the debugs message
say Test Begin
[00:10:17 INFO]: [Not Secure] [Server] Test Begin
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (HAND) at PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] Ignoring InteractAtEntity event
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (HAND) with PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] UI session 'trading' started for player DApples_.
[00:10:19 INFO]: [Shopkeepers] Opening UI 'trading' ...
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (OFF_HAND) at PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] Ignoring InteractAtEntity event
[00:10:19 INFO]: [Shopkeepers] Player DApples_ is interacting (OFF_HAND) with PLAYER at Location{world=CraftWorld{name=world},x=-26.5,y=93.0,z=-78.5,pitch=0.0,yaw=105.54087}
[00:10:19 INFO]: [Shopkeepers] Cancelling entity interaction
[00:10:19 INFO]: [Shopkeepers] Ignoring off-hand interaction
[00:10:19 INFO]: [Shopkeepers] Inventory event (InventoryCloseEvent): player=DApples_, view-type=MERCHANT, view-title=§2Shopkeeper
[00:10:19 INFO]: [Shopkeepers] Player DApples_ closed UI 'trading'.
[00:10:19 INFO]: [Shopkeepers] UI session 'trading' ended for player DApples_.
It mentions that the inventory was closed. But there is no way to know why or what closed it.
Interestingly, it does not mention that the shop has no trades. So from the logs it appears as if the inventory is opened and then immediately closed again by something, e.g. your client, the server, some plugin, ...
Please try to reproduce without client side mods, and with a plain Spigot server without other plugins. I cannot reproduce it on this setup. Then step-by-step make changes towards your actual setup until it breaks.
Unless you are able to indentify which specific aspect of your setup breaks it I am not able to investigate it.
i found that this mod cause bugs , thanks for help
naari3/offers-hud#50