Shopkeepers not keeping custom item's properties
D1N60 opened this issue ยท 3 comments
Preliminaries:
- Shopkeepers version:
2.10.0
- Spigot version:
This server is running CraftBukkit version git-Spigot-6f4ff1b-983305b (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
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 This server is running CraftBukkit version git-Spigot-6f4ff1b-983305b (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)) with the latest version of Shopkeepers (currently *2.10.0), with ONE other plugin 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.
The compatibility I'm looking for is with Coins
https://www.spigotmc.org/resources/coins.33382/
It creates a custom coin with a head image, custom name, custom worth, and custom lore that is based on the server currency $, so you can have a physical representation.
I am currently using these coins to be able to trade currency for items with Shopkeepers.
Everything worked perfectly for me and other players...until server restart.
After server stop/start, the Amin Shopkeeper NPC still had what looked like the same coin item, with all of the same properties as before. Let's call that SK(shopkeeper) Coin $1.
I withdrew a matching Coin $1 to my inventory. Let's call that INV(inventory) Coin $1.
SK Coin $1 would not trade with INV Coin $1.
When I took the SK Coin $1 from the GUI and back into my inventory, SK Coin $1 did not stack onto INV Coin $1, like normal.
They did not match. Shopkeeper's memory of SK Coin $1 was different after restart
I placed fresh INV Coin $1 into Shopkeeper and it traded and acted like normal with any new INV Coin $1
I tried to deposit SK Coin $1 back into my balance and that still worked, the Coin's plugin still recognized it.
I restarted the server and the fresh INV->SK Coin we put in there had the same behavior.
I believe some info is being lost on restarts. Could you please look into this? Both are really great plugins otherwise and I would love to have a fork to trade normal $ currency. Thanks!
Sound like this issue to me: #578
Since you are using a plugin to create these items, this might also be an issue with the Coins plugin to producing items in Spigot's internal format. Can you provide me a config and setp-by-step instruction for how to create the item you are having issues with?
Edit: If you created that coin item prior to updating to 1.16, then this issue might also be caused by https://hub.spigotmc.org/jira/browse/SPIGOT-5964
The snapshot for v2.11.0 (https://nexus.lichtspiele.org/repository/snapshots/com/nisovin/shopkeepers/Shopkeepers/2.11.0-SNAPSHOT/Shopkeepers-2.11.0-20200801.230352-3.jar) has a command /shopkeeper convertitems
with which you can convert existing items to Spigot's current internal/compatible format. But read the full changelog (https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md) in case you decide to install that snapshot.
Agreed this could be a duplicate issue around the same parameters.
Everything was introduced first using 1.16.
How to create the item:
Install Vault
Install Coins plugin
No config.yml choices needed
Give yourself some sort of vault balance such as /eco give blablubbabc 100
Type /withdraw 100
You will now have 100 coins as a single physical item (default sunflower icon) in your inventory. Your new vault balance will be $0
If there is a Spigot plugin that you'd recommend instead for a Vault to Physical transaction translation, then I would be open to it, I would just want it to hold after restarts.