Player shops nonfunctional with 1.31 on Spigot 1.8
blablubbabcDEV opened this issue · 9 comments
Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/274
Originally posted by Jikoo_K (Dec 13, 2014):
What steps will reproduce the problem?
- Create NPC shops (buy and trade tested personally, sell reported by users)
- Attempt to use the NPC createdWhat is the expected output? What do you see instead?
Trading shop has specified offers available, but they cannot be traded for - happens with bypass permission for trading to own shop and at others' shops.
Buy shop does not populate trades at all, though the offers are configured correctly and are visible in the shopkeeper editor.What version of the product are you using?
Shopkeepers 1.31, Spigot 1.8 git-Spigot-b8f6402-a646500Do you have an error log of what happened?
N/A, will enable debug and attempt to reproducePlease provide any additional information below.
Config: http://paste.md-5.net/foculiyope.hsRunning TradeCraft: https://github.com/CoreNetwork/TradeCraft
Our version is slightly modified to not assume Shopkeepers are normal villagers, forked from CoreNetwork/TradeCraft@1d7e167
I don't think it has to do with this issue unless the Shopkeepers API was horribly changed in 1.31 -Â the only thing we do is check if a vanilla villager is a Shopkeeper before it's replaced with a TradeCraft villager.I'll enable debug and attempt to reproduce this at my earliest convenience, just wanted to get this ticket open as a followup.
Originally commented by Jikoo_K (Dec 14, 2014):
[at]blablubbabc:
Thanks, I'll try without lore on the currency items themselves. That'd explain buy shops not working - no valid currency remaining - but it doesn't explain trading. Hopefully debug will get to the bottom of that.
I have tested on others' shops as well, prevent-trading-with-own-shop should not be the issue.
Enabling debug now, I'll get back with the results.
Edited Dec 14, 2014
Originally commented by Jikoo_K (Dec 14, 2014):
I've messed with it more, and trading shopkeepers appear to be fine now. Normal and trading shops work, buy still does not populate with offers.
The debug logs do not seem to offer any insight, though.
The only changes I have made to the config are removing the lore from the currency objects.
currency-item: LAPIS_BLOCK
currency-item-data: 0
currency-item-name: ''
currency-item-lore: []
zero-currency-item: SLIME_BALL
zero-currency-item-data: 0
zero-currency-item-name: '&9Lapis Blocks'
zero-currency-item-lore:
- '&aLeft click to increase'
- '&cRight click to decrease'
- '&fSneak to change by 10'
high-currency-item: EMERALD
high-currency-item-data: 0
high-currency-item-name: ''
high-currency-item-lore: []
high-currency-value: 9
high-currency-min-cost: 9
high-zero-currency-item: SLIME_BALL
high-zero-currency-item-data: 0
high-zero-currency-item-name: '&aEmeralds'
high-zero-currency-item-lore: - '&aLeft click to increase'
- '&cRight click to decrease'
- '&fSneak to change by 10'
The debug info doesn't look useful as it doesn't offer any information about what the contents of the villager being opened are. http://paste.md-5.net/kajifefutu.vbs
For what it's worth, I'm now on Spigot git-Spigot-612de46-07c2162, though I don't believe that should affect much anything. Tomorrow I'll try with TradeCraft disabled, it's rather late for me now though.
Edited Dec 14, 2014
Originally commented by blablubbabc (Dec 14, 2014):
[at]Jikoo_K:
The debug log is indeed not very useful if the trades don't even show up. It would be useful if you try to trade and it then tells you why it didn't accept your item.
Your buy shop needs the correct currency items and at least one of each items you want to buy. With the correct items in the chest it should show up in the editor window for you to setup the concrete prices.
Edited Dec 14, 2014
Originally commented by Jikoo_K (Dec 14, 2014):
[at]blablubbabc:
My buy shops do have the correct currency items - plain lapis blocks and plain emeralds. The editor also shows the items correctly with prices. The issue is that the shop is not populating the villager menu, an issue usually related to not having enough currency. I've double and triple checked that the currency is correct.
I'll try removing the lore and name config lines entirely to ensure that they're null, but to my understanding empty data is not added.
Edit: With F3+H enabled, the currency objects look identical to the ones in the chest - no additional nbt tags or anything. Deleting the config lines only regenerated them.
Now that I look at it more, I realized that the currency items in the chest appear in the buy shop editor menu. That leads me to believe that the comparison is failing somehow.
Input chest: http://puu.sh/duYG2/1c761e9d81.png
Editor: http://puu.sh/duYLg/c5ece61251.png
The lapis blocks being shown as currency and the one being displayed as a potential offer are identical in appearance to the client.
Shop is empty, as explained before: http://puu.sh/duYTc/7d935d492f.png
Edited Dec 15, 2014
Originally commented by blablubbabc (Dec 14, 2014):
First thing I noticed is that you seem to use the new 'currency-item lore' setting as information for the player on how to setup the trades. However the currency-item-lore specifies how the lore of the items used in the trades has to be as well. So your players won't be able to use normal slime_balls or emeralds for the trades, if those don't have the custom lore as well.
Then next you have the 'prevent-trading-with-own-shop' set to true. Just wanted to point out that you need to be op in order to still trade with your own shop (bypass permission won't help here). However I don't think that was changed between 1.30 and 1.31.
Next thing would be that you check out what the debug log says once you try a trade out.
And if that doesn't help try it without that TradeCraft plugin again, just to make sure that this is not the issue.
The main change in 1.31 are the configureable currency item name and lore. So I assume the issue is that your old shops still use the old currency (with different lore) or that you provide the wrong currecny item when you attempt to trade.
The buy shop for example won't show the trade if you don't have the correct currency items in the chest.
Originally commented by Jikoo_K (Dec 15, 2014):
[at]blablubbabc:
Thank you, working perfectly!
Originally commented by blablubbabc (Dec 15, 2014):
[at]Jikoo_K:
Well, the buy shop trades show up fine for me..
Chest: http://prntscr.com/5h0iav
Editor: http://prntscr.com/5h0ig1
Trades: http://prntscr.com/5h0iik
Running the lastest 1.8 spigot build and shopkeepers 1.31.
Do you get the 'trading window opened' messages in the debug output when you click the villager?
Have you already tried removing that other villager plugin, just to see if it makes a difference?
Edit: Okay I can now reproduce the issue once I switch the currency item to lapis blocks.
Edited Dec 15, 2014