Docs

Currencies and number format

Everything that costs or pays in PulsePrison uses a currency from currencies.yml: enchants, attributes, milestones, autominers, mine upgrades, visitor taxes. Create as many as you want.

Where each balance lives

Each currency picks a provider:

ProviderStores the balance inTypical use
internalThe core player dataOnly for money, tokens and gems
profileThe player profile (JSON or database)Any new currency: shards, beacons, points
vaultAnother economy through VaultUsing another plugin's economy
playerpointsPlayerPointsStore points
commandAnother plugin: the balance comes from a placeholder and changes run commandsAny plugin without an API

Addons can register more providers. See Extending PulsePrison.

Options

yaml
currencies:
  shards:
    enabled: true
    provider: profile
    name: "Shards"               # plural
    singular: "Shard"
    symbol: "◆"
    color: "&b"
    format: "{color}{symbol} {amount} {name}"
    style: compact               # compact (1.5M), full (1,500,000), integer, plain
    whole-numbers: true          # rounds down
    starting-balance: 0          # profile only
    max-balance: 0               # 0 for no limit, profile only
    show-in-balance: true        # listed in /balance
    payable: false               # can be sent with /pay
    aliases: [shard]             # other names accepted by commands and costs

The id (shards) is what costs, actions, commands and placeholders use.

A currency from another plugin through commands

yaml
  coins:
    provider: command
    name: "Coins"
    format: "{color}{amount} {name}"
    balance-placeholder: "%otherplugin_coins%"
    give-command: "coins give {player} {amount}"
    take-command: "coins take {player} {amount}"
    set-command: "coins set {player} {amount}"

Needs PlaceholderAPI to read the balance.

Vault

With Vault installed, PulsePrison registers as the server economy using money. Stores and other plugins charge and pay on that balance.

To do the opposite, use another plugin's economy inside PulsePrison, create a currency with provider: vault.

Commands

CommandPermissionDoes
/balance [player]pulseprison.balance · .othersEvery currency with show-in-balance
/pay <player> <amount> [currency]pulseprison.paySends a payable currency
/economy give|take|set <player> <amount> <currency>pulseprison.admin.economyChanges a balance
/economy balance <player>pulseprison.admin.economyEvery balance of a player
/economy top [currency]pulseprison.admin.economyTop 10
/economy reset <player> [currency]pulseprison.admin.economyResets a balance

/economy aliases: /eco, /econ. Amounts accept suffixes: 1.5K, 2M, 3B.

Placeholders

PlaceholderExample
%pulseprison_currency_<id>%1.5M
%pulseprison_currency_<id>_formatted%◆ 1.5M Shards, with the currency format
%pulseprison_currency_<id>_full%1,500,000
%pulseprison_currency_<id>_raw%1500000.0
%pulseprison_currency_<id>_name%Shards with its color

Number format

One block in config.yml decides how numbers are written in messages, menus, the action bar and placeholders:

yaml
number-format:
  suffixes: ["", "K", "M", "B", "T", "Q", "Qi", "Sx", "Sp", "Oc", "No", "Dc"]
  compact-from: 1000       # below this, numbers are written in full
  decimals:
    small: 2               # 1 to 9.99  -> 1.25K
    medium: 1              # 10 to 99.9 -> 12.5K
    large: 0               # 100 to 999 -> 125K
    below-compact: 1
  trim-zeros: true         # 1.50K is written 1.5K
  grouping-separator: ","
  decimal-separator: "."
  money-symbol: "$"
  money-style: compact
  infinity: "∞"

For European style numbers, use grouping-separator: "." and decimal-separator: ",".

Every numeric PulsePrison placeholder accepts _compact and _commas at the end: %pulseprison_tokens_compact%, %pulseprison_tokens_commas%.

Currencies and number format | PulsePrison Core Docs