Currency and Number Formatting - No-Not-Jaden/NotBounties GitHub Wiki

Currency

Quick Setup

Run the command /bounty currency in-game to enter the quick setup.

Configuration Reference

currency:
  # Use the specified currency below over Vault if Vault is enabled
  override-vault: false
  # accepts a material or a placeholder
  # if the currency is a material, the plugin will automatically take away the necessary amounts
  object: 'DIAMOND'
  # before the currency in all occurrences in language.yml
  prefix: '&f'
  suffix: '&b◆'
  # only needed if you are using a placeholder, but will be called either way.
  # {player} & {amount} or use a placeholder
  remove-commands: [] # ['eco take {player} {amount}']
  add-commands: [] # ['eco give {player} {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: AUTOMATIC

See config.yml for the most updated options.

Prefix and Suffix

The prefix and suffix will go before and after the currency in any text using it. Because of this feature, prefixes and suffixes do not need to be added in the language.yml file. These values allow you to use chat codes or hex in the form of &#ffffff.

  # before the currency in all occurrences in language.yml
  prefix: '&f'
  suffix: '&b◆'

NotBounties will hook into vault automatically if it is installed. override-vault must be set to false otherwise object will be used as currency. If you are experiencing difficulties with connecting Vault, see Placeholder as Currency.

  override-vault: false

Item as Currency

By default, if Vault is not connected, diamonds are the currency of bounties. If Vault is connected and you want to use an item as currency, set override-vault to true.

Object

The object of the currency is the name of the material. This is the only thing you need to change to get the currency functioning.

  object: 'DIAMOND'

Custom Model Data

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>'

Special Item as Currency

If you want to add enchantments, a custom name, or more customization to your item, check out this guide

Placeholder as Currency

Placeholders can be used as currency if NotBounties doesn't hook into your currency plugin. Using a placeholder required PlaceholderAPI to be installed.

Object

The object of the currency is the placeholder in single quotes including the % on either side.

  object: '%vault_eco_balance%'

Remove and Add Commands

In order for a placeholder as currency to work correctly, remove and add commands must be defined to transact the currency. You can list multiple commands in a list, or use a single one. Replace the player name with {player} and the amount with {amount}

  # {player} & {amount} or use a placeholder
  remove-commands: ['eco take {player} {amount}']
  add-commands: ['eco give {player} {amount}']

The same thing can be written as

  # {player} & {amount} or use a placeholder
  remove-commands: 
    - 'eco take {player} {amount}'
  add-commands: 
    - 'eco give {player} {amount}'

Manual Economy

The manual-economy option controls how much NotBounties interacts with your economy. There are 3 options to choose from

  • AUTOMATIC - All currency transactions relating to bounties will be handled by NotBounties
  • PARTIAL - NotBounties will only handle currency transactions for auto-bounties
  • MANUAL - NotBounties will not handle any currency transactions
  # 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: AUTOMATIC

Multiple Currencies

The currency option add-single-currency is related to using multiple currencies. See Multiple Currencies for more information.


Number Formatting

Configuration Reference

# formatting of large numbers
number-formatting:
  # Same as EssentialsX config
  # For 1.234,50 use de-DE
  # For 1,234.50 use en-US
  # For 1'234,50 use fr-ch
  format-locale: en-US
  # pattern for currency to be displayed - symbols are only placeholders, if you want to change the symbols, change format-locale
  pattern: '#,###.##'
  use-divisions: true
  # makes the number smaller and adds a suffix ex: 1000 = 1K | 1234 = 1.23K | 5467900 = 5.47M
  divisions:
    # the division and suffix
    1000: K
    1000000: M
    1000000000: B
    1000000000000: T

See config.yml for the most updated options.

Format Locale

Counties have different formats of displaying numbers with a thousands place and decimals. The default is set to the United States. Changing this to your format allows players to use that format when entering numbers and that format will be displayed in messages. To find your format, look at this list.

  # For 1.234,50 use de-DE
  # For 1,234.50 use en-US
  # For 1'234,50 use fr-ch
  format-locale: en-US

Pattern

The pattern represents how the digits get displayed. Use , to separate the thousands place and . to separate the decimals. These symbols must be used. To change the currency symbols in-game, change the format locale. You can use this to change the amount of decimals or remove the thousands separator all together. For more information on what each symbol does, look at this guide.

  pattern: '#,###.##'

Divisions

Divisions reduce the size of large numbers. Instead of 6,223,566,874.23 being displayed, 6.22B would be displayed with the default config. This feature is enabled by default. To disable it, change the use-divisions option to false. The amount of decimals shown can be changed by modifying the pattern described above. To customize the divisions, the format is (number representation): (text representation).

  use-divisions: true
  # makes the number smaller and adds a suffix ex: 1000 = 1K | 1234 = 1.23K | 5467900 = 5.47M
  divisions:
    # the division and suffix
    1000: K
    1000000: M
    1000000000: B
    1000000000000: T

Other Currency Related Options

Minimum Bounty

This value is the lowest amount of currency that must be spent in order for a bounty to be set. Decimals can be used.

# minimum amount of currency a bounty can be
minimum-bounty: 1

Minimum Broadcast

This value is the lowest amount of currency that must be spent in order for the bounty to be broadcast to other players. The players who are affected by the bounty will still get a message.

# minimum amount of currency that will broadcast bounties
minimum-broadcast: 50

Bounty Tax

The bounty tax is a cost added on top of the bounty that the player must pay in order to set their bounty. A bounty tax of 0.75 would mean that the player would have to pay the price of the bounty + 75% of the price. Ex: A bounty for 100 currency would cost 175 currency to be set.

# percent extra they have to pay to set a bounty - uses a DECIMAL
# ex: bounty-tax = 0.25, a bounty set for 100 would cost 125 to be placed
# use this if players are setting too many bounties
bounty-tax: 0.0

Death Tax

This is the same thing as Bounty Tax, but the player who died with a bounty must pay it.

# same as bounty-tax, except the player who dies has to pay this
# ex: death-tax = 0.1, a bounty set for 100 would cost the player 10 when they die
# players cannot go into debt
death-tax: 0.0

Buying Your Own Bounty

Enabled by default, players can buy their own bounties at an extra price. The price will be multiplied by cost-multiply for the player to buy their own bounty. The permission node associated with this is notbounties.buyown and is given to players by default.

buy-own-bounties:
  enabled: true
  # bounty set for $100 would have to be bought for $125
  cost-multiply: 1.25

Redeem Reward Later / Vouchers

The redeem-reward-later configuration section allows you to give players vouchers for claiming bounties instead of the money directly. If manual economy is set to automatic, clicking with the voucher in your hand will redeem it for your currency. You can also choose to have a different voucher for every different person who spent money on the bounty with the voucher-per-setter option. For customizing the voucher item, name and lore of the item can be changed in the language.yml file. The setter-lore-addition text will be added to the end of the item lore for each setter the voucher represents.

# this will give players a piece of paper after claiming a bounty that can be right-clicked to redeem the reward
redeem-reward-later:
  enabled: false
  # this will give a voucher for every different person who set a bounty
  voucher-per-setter: false
  # additional line or lines at the end of bounty-voucher-lore in language.yml
  # leave blank for no line addition
  # if you decide to not use this and are using voucher-per-setter, you can get the specific setter amount in bounty-voucher-name and bounty-voucher-lore with {amount} in the language.yml file
  setter-lore-addition: '&8{player} set a bounty of {amount}'

Related Pages

⚠️ **GitHub.com Fallback** ⚠️