Vault

With Vault or VaultUnlocked installed, Obfeco registers itself as the server's economy. Every plugin that uses Vault (shops, jobs, auctions, EssentialsX /balance and /pay) then works with your primary currency.

Configuration

yaml
vault:
  enabled: true
  primary-currency: dollars
  • enabled — register with Vault on start. Restart after changing it.
  • primary-currency — the currency id Vault plugins read and write. It must match a file in currencies/. Changing it takes effect after /obfeco reload.

Obfeco registers at the highest Vault priority, so it wins over another economy plugin that's also installed. Running two economy plugins at once isn't recommended anyway.

One currency through Vault

Vault's economy API only knows one currency. The primary currency goes through Vault; every other Obfeco currency is reached through /obfeco commands, PlaceholderAPI, or the developer API.

How Obfeco answers Vault

Vault call Obfeco's answer
Currency name (singular and plural) The primary currency's display-name
format(amount) The amount with Obfeco's suffixes (1.50k), without the currency symbol
Fractional digits formatting.decimal-places
hasAccount / createPlayerAccount Always yes; every player has an account
Withdraw more than the balance Fails with "Insufficient funds"; balances never go negative
Banks Not supported
World-specific calls Same balance in every world

Changes made through Vault don't send Obfeco's own receive/lose messages and aren't written to the transaction log; the plugin making the change handles its own messages.

Checking the hook

Run /vault-info. The economy line should read Obfeco. With logging.console: true you'll also see Hooked into Vault at startup.

If it isn't hooked, see Common Issues.