Economy
Module economy. Settings files: economy.toml, economy.json.
Commands
| Command | What it does | Permission | Default |
|---|---|---|---|
/balance, /bal, /money | Your balance in every currency | brita.economy.balance | everyone |
/balance <player> | Another player's balance, also offline | brita.economy.balance.others | everyone |
/pay <player> <amount> [currency] | Pay another player, also offline | brita.economy.pay | everyone |
/baltop [currency] [page] | The richest players and the server total | brita.economy.baltop | everyone |
/eco give|take|set <player> <amount> [currency] | Change a balance; works from the console | brita.economy.admin | operators |
/eco reset <player> [currency] | Set a balance back to the start amount | brita.economy.admin | operators |
Go below 0, down to the currency's min | brita.economy.loan | nobody | |
| Use priced commands for free | brita.economy.free | nobody |
Every player who joins gets an account. Balances are kept in britaessentials-economy.json in the world
folder, saved a few seconds after a change and when the server stops.
economy.toml
| Setting | What it does | Default |
|---|---|---|
enabled | Switches the money commands and command prices on or off | true |
log | Writes every payment, /eco change, command price, sale and purchase to logs/britaessentials-economy.log | false |
baltopPageSize | Players on one page of /baltop (1 to 50) | 10 |
Currencies and prices
economy.json holds the currencies and what commands cost; run /brita reload after changing it. The first
currency is the main one: /pay, /baltop, /eco and prices use it unless another is named. A broken
currency or price is reported in the server log and left out.
{"currencies": {
"money": {"name": "Dollar", "plural": "Dollars", "symbol": "$", "format": "{symbol}{amount}"},
"euro": {"name": "Euro", "plural": "Euro", "symbol": "€", "format": "{amount} {symbol}",
"thousands": ".", "decimal": ","},
"tokens": {"name": "Token", "plural": "Tokens", "format": "{amount} {name}", "decimals": 0, "payable": false}
},
"costs": {"spawn": 100, "back": {"amount": 5, "currency": "tokens"}}}
| Currency option | What it does | Default |
|---|---|---|
name, plural | Name for exactly 1, and for every other amount | the id |
symbol | Used where format says {symbol} | empty |
format | How an amount looks: {amount}, {symbol}, {name} | {symbol}{amount} |
decimals | Decimal places, 0 to 4 | 2 |
thousands, decimal | Signs between thousands and before the decimals; German style "." and "," | "," and "." |
start | Balance of a new player | 0 |
min | Lowest balance; below 0 only for players with brita.economy.loan | 0 |
max | Highest balance; payments that would pass it are refused | 10 trillion |
payable | Players may /pay it to each other | true |
- Amounts are typed as
250,12.50or12,50(no thousands signs). - A price is taken only when the command succeeds. A teleport pays on arrival, so a cancelled one costs nothing.
- Prices work for
/spawn,/back,/warp,/home,/sethome,/tpa,/tpahere,/pwarp("pwarp"per visit,"setpwarp"to create one) and your own commands. - A price with words, such as
"warp mine": 25, is only for that warp; it replaces the general"warp"price.