Commands

Economy

config.yml for the money itself, modules/economy.yml for the commands.

Command Permission
/pay <player> <amount> chorus.economy.pay
/balance [player] chorus.economy.balance
/baltop chorus.economy.baltop
/eco <give|take|set|reset> <player> [amount] chorus.economy.admin
/paylog [player|*] chorus.economy.paylog
/paytoggle chorus.economy.toggle

ChorusCore is an economy in its own right. None of this needs another plugin. Balances live in the same database as everything else and are held in memory while the server runs, which is how a priced command can read one without a round trip.

Where the money comes from#

# config.yml
economy:
  enabled: true
  provider: auto
provider What it means
auto The built-in ledger, unless another economy plugin has registered with Vault, in which case that one wins and everybody agrees.
self The built-in ledger, whatever else is installed.
vault Another plugin only. With no Vault every price is ignored.
off The same as enabled: false.

With Vault installed, the built-in ledger is offered to every other plugin at a low priority. A shop or jobs plugin spends the same money these commands do, and a dedicated economy plugin still wins if you install one.

/chorus status says which one is actually in use.

What money looks like#

economy:
  starting-balance: 0.0
  minimum-balance: 0.0
  maximum-balance: 1000000000000.0
  currency:
    symbol: "$"
    suffix: false
    decimals: 2
    singular: coin
    plural: coins

suffix: true writes 100$ instead of $100. singular and plural are for the lines that read "5 coins" rather than "$5".

A balance is never taken below minimum-balance or above maximum-balance. The separators are always 1,000.00 and are not configurable.

This block is only used by the built-in ledger; another economy plugin formats its own money.

Payments#

# modules/economy.yml
economy:
  minimum-payment: 0.01
  maximum-payment: 0.0
  confirm-above: 0.0
Key What it does
minimum-payment The smallest /pay accepts. Amounts are rounded to two decimals first.
maximum-payment The largest a single /pay may move. 0 means no ceiling.
confirm-above A payment of this much or more asks the sender to run the command again. 0 never asks.

Payments go to online players only. If the deposit fails after the money left the sender it is put straight back.

/paytoggle stops other players sending you money, and is remembered between sessions.

The payment log#

economy:
  log:
    enabled: true
    keep-days: 30
    page-size: 10

Every /pay is written down, so a dispute about a trade has an answer. /paylog reads your own; /paylog <player> and /paylog * read somebody else's and the whole server, and need chorus.economy.paylog.others.

keep-days: 0 keeps entries for ever, which on a busy server means a table that only ever grows. page-size maximum is 50.

/eco#

Creates and destroys money rather than moving it. Every use goes in the staff log.

/eco give Notch 500
/eco take Notch 100
/eco set Notch 1000
/eco reset Notch

Taking more than somebody has empties the account rather than going negative. reset puts a balance back to starting-balance.

It works on a player the server has never had online. A name the server does not recognise is looked up in the plugin's own record of who has played here.

/baltop#

economy:
  top-size: 10

Ranks every account on the server, paged, and adds up what is in circulation. Maximum 50 a page; it ships with a 5-second cooldown.

On a server whose money belongs to another plugin there is no such list to read, so it falls back to ranking whoever is online.

Prices on commands#

Any command can cost money — see Per-command rules.

commands:
  home:
    price: 25.0

Charged only on success. With no economy at all, every price is ignored rather than refusing the command. chorus.bypass.price never pays.

Turning it all off#

economy:
  enabled: false

Every price is ignored and /pay and /balance say the economy is switched off. The commands are still registered, so a player who tries gets an explanation rather than "unknown command".

Config reference#

# modules/economy.yml
enabled: true

economy:
  minimum-payment: 0.01
  maximum-payment: 0.0
  top-size: 10
  confirm-above: 0.0
  log:
    enabled: true
    keep-days: 30
    page-size: 10

commands:
  defaults: ...
  pay: ...
  balance: ...
  baltop: ...
  eco: ...
  paylog: ...
  paytoggle: ...

Permissions#

Permission Effect
chorus.economy.pay /pay
chorus.economy.balance /balance
chorus.economy.balance.others /balance <player>
chorus.economy.baltop /baltop
chorus.economy.admin /eco
chorus.economy.paylog /paylog on yourself
chorus.economy.paylog.others /paylog <player> and /paylog *
chorus.economy.toggle /paytoggle
chorus.bypass.price Never pays for a command