Special Item as Currency - No-Not-Jaden/NotBounties GitHub Wiki
If you want a stylized item as your currency (enchants, custom name, etc.), this is the guide to look at. The way this works is by using custom model data that NotBounties looks for and having your own add and remove commands.
Creating the item with NBT data or components
I like to generate my special items using this website which makes it really easy. You can customize it however you want. The important thing is that you add a custom model data which is located in the Extra section. It can be any number, I've used 3 in this example.
Ignore the whole give command part, all you need is the item with it's tags. This is the item I generated:
magma_cream{display:{Name:'["",{"text":"Coin","italic":false,"color":"yellow","bold":true}]'},Enchantments:[{}],CustomModelData:3}
The format will depend on which version you are using. You can change it at the top right. I'm using 1.20.2 for MC version 1.20.4. If you are using MC 1.20.5, use the snapshot version in the generator. You will need to use this text when supplying the coins into the economy outside of NotBounties.
config.yml file
Editing the currency settings in theWhatever item you create, replace the one I've created in this following section, but take a look at the notes below before you save anything.
currency:
# Use the specified currency below over Vault if Vault is enabled
override-vault: true
# accepts a material or a placeholder
# if the currency is a material, the plugin will automatically take away the necessary amounts
object:
- 'MAGMA_CREAM<3> '
# before the currency in all occurrences in language.yml
prefix: '&f'
suffix: ' &eCoins'
# only needed if you are using a placeholder, but will be called either way.
# {player} & {amount} or use a placeholder
remove-commands:
- 'minecraft:clear {player} magma_cream{display:{Name:''["",{"text":"Coin","italic":false,"color":"yellow","bold":true}]''},Enchantments:[{}],CustomModelData:3} {amount}'
add-commands:
- 'minecraft:give {player} magma_cream{display:{Name:''["",{"text":"Coin","italic":false,"color":"yellow","bold":true}]''},Enchantments:[{}],CustomModelData:3} {amount}'
# if you are using multiple currencies
# descending - currency will be given in descending order of weights
# first - only the first currency in the object list will be given
# ratio - a ratio of the currencies with their weights will be given
# bimodal - add the first currency, remove the second
add-single-currency: descending
# this option will change how involved NotBounties will be with currency transactions
# AUTOMATIC - NotBounties will do all the currency transactions
# PARTIAL - NotBounties will only do the currency transactions for auto-bounties
# MANUAL - NotBounties will not do any currency transactions, but will run the remove and add commands
# I suggest pairing this up with the redeem-reward-later option for a voucher of proof
manual-economy: MANUAL
Here is what I changed from the default:
- Changed the suffix
override-vault
is set to true- Added remove and add commands for a specific item
- Made the object match the item that is being used and added
<3>
to represent a custom model data of 3 (the space after the <3> is important for NotBounties versions 1.18.16 and below) - Set
manual-economy
to MANUAL
When pasting in your item with all the NBT data, you will have to add an extra single quote ('
) to every other single quote in the item to obey YAML formatting rules. You can see how I've changed it above.
Make sure that the item and its tags match wherever you give the item out. If you have any more question or need help setting this up, don't be afraid to ask in the Discord Server.