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:
| Provider | Stores the balance in | Typical use |
|---|---|---|
internal | The core player data | Only for money, tokens and gems |
profile | The player profile (JSON or database) | Any new currency: shards, beacons, points |
vault | Another economy through Vault | Using another plugin's economy |
playerpoints | PlayerPoints | Store points |
command | Another plugin: the balance comes from a placeholder and changes run commands | Any plugin without an API |
Addons can register more providers. See Extending PulsePrison.
Options
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 costsThe id (shards) is what costs, actions, commands and placeholders use.
A currency from another plugin through commands
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
| Command | Permission | Does |
|---|---|---|
/balance [player] | pulseprison.balance · .others | Every currency with show-in-balance |
/pay <player> <amount> [currency] | pulseprison.pay | Sends a payable currency |
/economy give|take|set <player> <amount> <currency> | pulseprison.admin.economy | Changes a balance |
/economy balance <player> | pulseprison.admin.economy | Every balance of a player |
/economy top [currency] | pulseprison.admin.economy | Top 10 |
/economy reset <player> [currency] | pulseprison.admin.economy | Resets a balance |
/economy aliases: /eco, /econ. Amounts accept suffixes: 1.5K, 2M, 3B.
Placeholders
| Placeholder | Example |
|---|---|
%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:
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%.