Shopkeepers / Shopkeepers

A Bukkit plugin to create custom villager shopkeepers.
https://dev.bukkit.org/projects/shopkeepers
GNU General Public License v3.0
101 stars 54 forks source link

Players randomly cannot trade. #610

Closed Spoonerj1 closed 4 years ago

Spoonerj1 commented 5 years ago

Preliminaries:

Reproduction on a fresh and up-to-date Spigot server:

I was <able> to reproduce my issue on a freshly setup and up-to-date Spigot server (currently Spigot 1.14.4-R0.1-SNAPSHOT (build 2445)) with the latest version of Shopkeepers (currently Shopkeepers-2.7.2.jar), with no other plugins and with no kinds of other server or client mods.

The issue:

Provide a detailed description of your problem and add as much information as possible which could help reproducing the issue.

Include:

blablubbabc commented 5 years ago

Try this command: minecraft:give {player} minecraft:sunflower{display:{Name:"{\"text\":\"Vote Coin\"}"},Unbreakable:1b} 1

Explanation:

Spoonerj1 commented 5 years ago

Just saw this, will report back if this works. Thanks for the breakdown too, I don't know as much about how items are saved by spigot or plugins as I probably should.

Spoonerj1 commented 5 years ago

I am still having the same issue with the "new" vote coins. I'm using the plugin "voting plugin" to deliver the coins when a player votes, but there appears to be no difference in the coins I get from the plugin vs the coins I get just using the command. It still appears to be randomly working, but mainly its not working.

I am going to try using a regular sunflower, named Vote Coin. I'll report back again

20.08 11:21:35 [Server] Server thread/INFO [Shopkeepers] Player Spoonerj is interacting with entity at Location{world=CraftWorld{name=casimir},x=260.6788,y=66.0,z=144.9968,pitch=0.0,yaw=80.020645} 20.08 11:21:35 [Server] Server thread/INFO [Shopkeepers] Opening UI 'trading' ... 20.08 11:21:35 [Server] Server thread/INFO [Shopkeepers] UI 'trading' session started for player 'Spoonerj'. 20.08 11:21:35 [Server] Server thread/INFO [Shopkeepers] Player Spoonerj is interacting with entity at Location{world=CraftWorld{name=casimir},x=260.6788,y=66.0,z=144.9968,pitch=0.0,yaw=80.020645} 20.08 11:21:37 [Server] Server thread/INFO [Shopkeepers] Inventory click: player=Spoonerj, view-type=MERCHANT, view-title=Shopkeeper, raw-slot-id=2, slot-id=2, slot-type=RESULT, shift=false, hotbar key=-1, left-or-right=left, click-type=LEFT, action=NOTHING 20.08 11:21:37 [Server] Server thread/INFO [Shopkeepers] Not handling trade: There is no item in the clicked result slot (no trade available). 20.08 11:21:38 [Server] Server thread/INFO [Shopkeepers] Player Spoonerj closed UI 'trading'. 20.08 11:21:38 [Server] Server thread/INFO [Shopkeepers] UI 'trading' session ended for player 'Spoonerj'.

Spoonerj1 commented 5 years ago

The trade seems to be successful if I place the coins in the trade window, pick an item, and then take the items. 2019-08-20_10 26 36 2019-08-20_10 26 25 2019-08-20_10 26 15 2019-08-20_10 26 03

Spoonerj1 commented 5 years ago

those photos posted in reverse order... the first image is at the bottom, the last image with a completed trade is at the top

blablubbabc commented 5 years ago

I just tried again, via the command and by using VotingPlugin to execute the command, and I can't reproduce any issues with the command I gave above. I also tried it after reloading Shopkeepers, and I tried after dragging the item around in the inventory (causes Spigot to normalize the item). Video of some of my testing: https://oc.h-in-t.net/nocloud/index.php/s/TAqjldu7VfuTw6M

Have you verified that you are testing with the correct item after changing the command? Have you freshly setup your trades with that new item? Otherwise, another guess would be that maybe some plugin might be interferring. Do you run any plugins which might modify players' items? Do you use ViaVersion? Can you reproduce the issue on a fresh and up-to-date Spigot server?

Spoonerj1 commented 5 years ago

I update the spigot build as soon as it available, we the players know that sometimes that means there are bugs in the plugins. Let me do some more comparing, I wonder if I might have permissions wrong, I use Luckperms for that and have had it installed with shopkeepers during tests I do have a chest sorting plugin also, but it seems to have no effect if it is enabled or disabled. the issue still randomly happens...

N7NobodyCats commented 5 years ago

is there a fix for this yet? im not the owner of the server, just a player, but having the same issue happen on one im on. trying to find some way to fix, so i can pass it along to the owner.

blablubbabc commented 5 years ago

I was so far not able to reproduce the described issue after using the modified item mentioned above. My guess is still that this is an issue with the item used inside the trade and the items offered to the trader. To fix the shopkeeper, both the items used by players, as well as the items the trades got setup with need to be adjusted.

One way to compare the data of items in-game is by getting the item from the shopkeeper, and the item used for the trading, put them both into a chest (carefully, to not trigger any 'item dragging' inside the inventory when placing the item in a slot) and then use minecraft's /data command to print the data of that chest.

blablubbabc commented 4 years ago

Closing this as I wasn't able to reproduce this with the modified item mentioned above, so there is not much I can further do about this with the information provided.