two items names for one item
seema84 opened this issue ยท 7 comments
Plugin Version
ChestShop's version is: 3.12 (build 307)
Server Version
Paper version git-Paper-783 (MC: 1.16.5)
What other plugins are you running?
Chestshop
What is happening?
some items have 2 different item names
What did you expect to happen?
one item name for every item
Additional context
- if i create the shop with a "?" in the last line, it take the name it show on /iinfo
- if i type manuell the last line with the item name (which is displayed to me with /iinfo) than he change the name to a different name
- both name works
Please provide your items.db file as well as the nbt data of the item in question.
how i get the nbt data of this item?
The easiest would be to put the item into a chest and use the /data get command on it.
{z: -385, id: "minecraft:chest", y: 62, x: -16, Items: [{Slot: 1b, id: "minecraft:enchanted_book", tag: {StoredEnchantments: [{id: "minecraft:protection", lvl: 3s}, {id: "minecraft:power", lvl: 4s}]}, Count: 1b}]}
According to your items.db file those are not the same items. (The enchantment order is different) Did you really only use one item stack? (Any kind of action of a different plugin might've modified it, it should've printed the new ID in /iteminfo too though)
In the store there is only one enchanted book.
If I enter the ID which shows /iteminfo, then the store changes the ID to another one by itself (as you can see on the picture). This does not only affect this one item/shop. I can buy this book with both IDs (#9k and #9l).
This behavior seems to be quite new.
Basically your issue is that something changed the order of the NBT data of your item (or at least the order that is used when serialising the Item to YAML which is used to store the item data inside the DB) Such a thing can happen either due to some server-internal conversion code or due to some plugin modifying the item which might trigger it.
I suggest to just ignore it as there isn't really a good way to stop that or (efficiently) find similar items in the db, shops shouldn't break due to this as the comparison code catches a lot of cases where the item info is the same but ordered differently internally.