Skip to content
Economy System

Economy System

Multi-Currency

Define as many currencies as you need in config.yml. Each currency has its own symbol, decimal precision, starting balance, and max balance.

One currency can be designated as the Vault provider (vault: true). This is the currency that all Vault-compatible plugins (shops, bounties, etc.) interact with.

Every amount is rounded down to the currency's decimals before it is applied, and both sides of a transfer get that same amount: with 2 decimals, a payment of 0.015 moves 0.01. An amount that rounds to 0 is refused, and the player is told the smallest one the currency counts. Interest (economy.interest) is credited per player, rounded down as well.

A plugin built on XCore moves money through money() (2.1), the same way whether a price is in an XCore currency or in another plugin's economy: see Shared Services.

Economy Commands

CommandDescriptionPermission
/ecoView all your balances—
/eco balance [player] [currency]View balancexcore.economy.balance.others for others
/eco pay <player> <amount> [currency]Send money—
/eco exchange <from> <to> <amount>Exchange currencies—
/eco history [player] [currency] [page]Transaction history—
/eco top [currency]Top balances—
/eco set <player> <amount> [currency]Set balancexcore.economy.admin
/eco add <player> <amount> [currency]Add balancexcore.economy.admin
/eco remove <player> <amount> [currency]Remove balancexcore.economy.admin
/eco reset <player> [currency|all]Reset to the starting balancexcore.economy.admin
/eco resetall [currency|all] confirmReset every player, online and offlinexcore.economy.admin
/eco reloadReload economy configxcore.economy.admin

Aliases: /economy, /money. The command was /coins before 1.0.7.

/eco pay and /eco exchange report success only once the other side has been credited; when the credit does not land, the sender gets the money back and is told so. /eco add and /eco remove are applied in one step, so two changes at the same moment cannot overwrite each other.

Currency Exchange

Players can exchange between currencies using /eco exchange <from> <to> <amount>.

Exchange rates are configured per pair:

exchange:
  enabled: true
  rates:
    coins-to-gems: 100    # 100 coins = 1 gem
    gems-to-coins: 80     # 1 gem = 80 coins

The rate format is <from>-to-<to>: <amount> where amount is how many of the source currency equals 1 of the target.

An exchange charges only the cost of what it buys, at the target's decimals, and the remainder stays in the balance: with coins-to-gems: 100 and gems without decimals, exchanging 250 coins gives 2 gems for 200 coins. An offer worth less than one unit of the target is refused, with the minimum.