Skip to content

Economy

BeestoXd edited this page Aug 15, 2026 · 1 revision

Economy

The plugin ships with a complete economy so selling works out of the box, with no economy plugin installed. It can also defer to an existing one, or hand its own balances to Vault so everything on the server shares one pot of money.

Choosing a provider

ECONOMY.PROVIDER in config.yml. Changing it requires a full server restart — not /spawner reload.

Mode Behaviour Use when
INTERNAL Balances live in this plugin's database. /balance, /baltop, /pay, /eco are handled here. You have no other economy plugin.
VAULT Defer to an external economy plugin (EssentialsX, CMI, …) through Vault. You already run an economy plugin and it owns money.
AUTO Use Vault when an economy provider is registered, otherwise fall back to INTERNAL. You want it to just work either way.

The packaged default is VAULT. On a server with no Vault economy installed, that means selling does not work until you change it. /spawner version will say Economy: unavailable (mode: VAULT).

Which one is running?

/spawner version
Economy: Internal (mode: INTERNAL)

Or check the console at start-up:

[Economy] Using the built-in economy (no external economy plugin required).
[Economy] Using EssentialsX.
[Economy] PROVIDER is VAULT but no economy provider is registered - selling is disabled.

The built-in economy

Active while the mode is INTERNAL, or AUTO with nothing external registered.

Balances live in the uvs_balances table of this plugin's own database, alongside spawner data. No separate setup.

Settings

All under ECONOMY.INTERNAL in config.yml:

Key Default Description
STARTING_BALANCE 0.0 What a new player starts with, and what /eco reset restores.
DECIMAL_PLACES 2 Rounding precision on every change. Clamped 0–6.
ALLOW_NEGATIVE false Allow debt. Blocks withdrawals that would go negative while false.
MAXIMUM_BALANCE 0 Per-player hard cap. 0 = unlimited.
CURRENCY_NAME_SINGULAR / _PLURAL Dollar / Dollars Names other plugins see through Vault.
REGISTER_WITH_VAULT true Publish this economy to Vault.
ALLOW_PAY true Player-to-player /pay.
MINIMUM_PAY 0.01 Smallest /pay amount.
BALTOP_SIZE 10 Default /baltop length.

Commands

/balance [player]                     aliases: /bal /money /uvsbalance
/baltop [size]                        aliases: /balancetop /moneytop
/pay <player> <amount>
/eco <give|take|set|reset> <player> [amount]    aliases: /economy /uvseco

Amounts accept K / M / B / T / Q suffixes: /eco give Steve 1.5M. Full details in Commands.

Correctness guarantees

Two things worth knowing, because they are the classic failure modes of a homegrown economy:

  • No drift. Every balance change is rounded to DECIMAL_PLACES using half-up BigDecimal arithmetic, so repeated additions cannot accumulate into fractions of a cent.
  • No lost updates. Each player's balance is mutated under its own lock, so two concurrent operations — two sells at once, a sell landing while a /pay is processing — cannot interleave and overwrite each other.

The Vault bridge

With REGISTER_WITH_VAULT: true (the default) and Vault installed, the built-in economy is published as a Vault economy provider. Shops, jobs, auction houses and anything else that talks to Vault then read and write these same balances.

Without it you would end up with two disconnected pots of money — spawner earnings in one, shop prices in another — which is the single most common economy misconfiguration on a Minecraft server.

                 +-------------------------------+
   Shop plugin ->|                               |
   Jobs plugin ->|  Vault  ->  UVS internal      |
   /balance    ->|             economy (uvs_...) |
                 +-------------------------------+
                        one pot of money

Vault is not required. Without it the economy simply stays internal to this plugin, and /balance still works.

In AUTO mode

If an external Vault economy is already registered when the plugin starts, the internal economy is not published — the external plugin keeps ownership and the console logs:

[Economy] An external Vault economy is already registered; not publishing the internal one.

This is the intended precedence: an existing economy always wins.


Using an external economy

Set PROVIDER: VAULT, install Vault plus your economy plugin, and restart.

From then on:

  • Selling pays out through that plugin.

  • /balance, /baltop, /pay and /eco defer — they tell the player which plugin owns money instead of acting:

    Money is handled by EssentialsX on this server - use that plugin's commands.
    

    You will usually want to remove the four economy commands' permissions from your default group in this case, so players see the other plugin's commands instead.

  • ECONOMY.CURRENCY_SYMBOL and the formatting options still apply to money this plugin prints, so payout messages match your server's style even when the balance lives elsewhere.


Currency formatting

Key Default Effect
CURRENCY_SYMBOL '$' The symbol
SYMBOL_BEFORE_AMOUNT true $1,500 vs 1,500$
COMPACT_FORMAT true 1.5K vs 1,500

Compact suffixes go K, M, B, T, Q.

For PlaceholderAPI you get all three forms — raw, formatted and compact. See Placeholders.


Recipes

Small server, nothing else installed

ECONOMY:
  PROVIDER: INTERNAL
  INTERNAL:
    REGISTER_WITH_VAULT: true

Install Vault too, and every other plugin shares these balances.

Existing EssentialsX economy

ECONOMY:
  PROVIDER: VAULT

Spawner earnings must not touch the main economy

ECONOMY:
  PROVIDER: INTERNAL
  INTERNAL:
    REGISTER_WITH_VAULT: false

A deliberately separate currency. Make sure players understand there are two.

No player-to-player transfers

ECONOMY:
  INTERNAL:
    ALLOW_PAY: false

See also

Clone this wiki locally