Use Item Display Name
rmb938 opened this issue · 3 comments
[Please search for tickets with the same issues as yours first before reporting!]
Plugin Version
3.10-SNAPSHOT (build 128)
Server Version
git-Spigot-f096622-7c395d4 (MC: 1.13.2)
What is happening?
Creating a shop with an item that has a display name does not show the display name on the sign
What did you expect to happen?
Show the display name on the sign
Please provide any additional info below
I want to be able to sell items create via https://dev.bukkit.org/projects/spawnstar and https://dev.bukkit.org/projects/homestar and have the item display name shown.
I thought about this a bit and there is a major issue here: Players could rename items that are worth nothing to something valuable e.g. "Diamond Block" and trick other players into bying e.g. dirt for insanely high prices. At the very least this would need to be a config option or making it admin-shop only by default. A permission to create such shops would also be possible I guess.
Another thing that would need to be addressed: Currently the name on the sign is used to get the Material name and get the actual stock of the shop from that. Using a display name would require to search the container for a matching item based on that and not the material or (especially in the case of the admin shop) to store the item in the items db and use an internal ID suffix.
Having it be admin shop only would work in my use case.
I didn't really think too much on the implementation. I think having to store something about the shop in a database seems a bit annoying. If I was writing it I wouldn't bother with this if I had to make a database call 🤷♂️