nikosgram / gringotts

Gringotts is an item-based economy plugin for the Bukkit Minecraft server platform. Unlike earlier economy plugins, all currency value and money transactions are based on actual items in Minecraft, per default emeralds.
https://www.spigotmc.org/resources/gringotts.42071/
BSD 2-Clause "Simplified" License
43 stars 35 forks source link

Use custom NBT data to determine Money Items. #115

Closed spikehidden closed 1 year ago

spikehidden commented 2 years ago

Is your feature request related to a problem? Please describe.

It would be great if money don't become worthless because you made a typo which you are correcting or you decide to change something in the lore or use another plugin to rename the items to have multilanguage support. Or if you use another plugin for custom item drops which reformats the name of the item slightly without any viewable difference to the player, it will not be usable as money then.

Describe the solution you'd like

Use a custom NBT tag to save an internal ID which will be set in the config to check its worth so that "old money" keep its value but also can change the name and other options.

Describe alternatives you've considered

I don't really think there is one except to somehow switch the old money with the new one which is annoying for the player depending on the amount of items.

Additional context

🤷‍♂️

nikosgram commented 2 years ago

Hello @spikehidden, they are actually lot of ntb data changes you as currency item.

https://github.com/nikosgram/gringotts/blob/master/src/main/resources/config.yml

    - material: emerald_block
      value: 9
#      unit-name: Emeralde
#      unit-name-plural: Emeraldes
#      displayname: Emeralde
#      damage: 10
#      custom_model_data: 1
#      lore:
#        - line1
#        - line2

Can you be a bit more specific on what kind of NTB data does it needs to be modified for those plugins to be working correctly?

spikehidden commented 2 years ago

Hello @spikehidden, they are actually lot of ntb data changes you as currency item.

https://github.com/nikosgram/gringotts/blob/master/src/main/resources/config.yml

    - material: emerald_block
      value: 9
#      unit-name: Emeralde
#      unit-name-plural: Emeraldes
#      displayname: Emeralde
#      damage: 10
#      custom_model_data: 1
#      lore:
#        - line1
#        - line2

Can you be a bit more specific on what kind of NTB data does it needs to be modified for those plugins to be working correctly?

It had to do with the formatting I think. So nothing in the config. But still the main reason I asked for this was to make it possible to change details in the config without the old money becoming worthless. Which could be a custom NBT field like gringotts-id: XXX or by an option that it will keep its worth but won't be given to players anymore.

The plugin I had problems with was DropEdit2 and I think the problem was that it did reformat the the name instead of saving it 1:1.