Multiple Currencies - No-Not-Jaden/NotBounties GitHub Wiki
NotBounties allows you to specify multiple currencies for players to use. Each currency can hold a different value and weight. All of the config options mentioned on this page are in the currency
configuration section in config.yml.
Using placeholders is the same in the object
, but add-commands
and remove-commands
still need to be set. The commands need to be listed in the same order they are in object
.
object:
- '%vault_eco_balance%'
- '%nottokens_amount%'
remove-commands:
- 'eco take {player} {amount}' # This is EssentialsX's currency remove command paired with Vault
- 'tokens remove {player} {amount}' # This is NotTokens' remove command
add-commands:
- 'eco give {player} {amount}'
- 'tokens give {player} {amount}'
This is an example of having the same value for each currency. A bounty of 5 could be set with any combination of diamonds, ancient debris, or gold blocks, as long as there are 5 items present.
object:
- 'DIAMOND'
- 'ANCIENT_DEBRIS'
- 'GOLD_BLOCK'
This is an example of having different values for each currency. This could be useful if your currencies have exchange ratios. Specifying no value will default with a value of 1 for the currency. A bounty of 100 could be set with 1 Netherite ingot, 10 diamonds, 5 diamonds and 50 gold ingots, or any combination of their values that add up to 100.
object:
- 'GOLD_INGOT' # default value of 1
- 'DIAMOND 10'
- 'NETHERITE_INGOT 100'
Weights decide which currencies will be used first. Weights are optional, and without them, the currencies will be used evenly. Higher weights are used before lower weights. Currencies without a weight specified are defaulted to a weight of 0. This is an example of using diamonds and diamond blocks as currency. Diamond blocks will be used first until the player doesn't have any left or the remaining value is less than 9, then regular diamonds will be used.
object:
- 'DIAMOND' # value of 1 and weight of 0 (default)
- 'DIAMOND_BLOCK 9 1'
The add-single-currency
config option allows you to choose if you want only one currency rewarded or multiple.
# 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
add-single-currency: descending
With this option set to 'first', only the first currency listed will be given to the player. Make sure that the first currency has the lowest value or the rewards may not be accurate.
With this option set to 'ratio', the currency will be given in a ratio of the weights. You will receive more of the currencies with higher weights than ones with lower ones.
This option will give the player the currency with the highest weight first, then lower weights until the proper amount is met. With the Currency Weights example, a bounty of 100 will reward the player with 11 diamond blocks and 1 diamond.
You can specify currency items to need custom model data for them to be used. This is an example of specifying the custom model data 54321
object:
- 'PAPER<54321>'
See multi-currency-example.yml for another example.