Skip to main content

💱 Currency Format

Vault v2.1.0 uses 4 keys to build the formatted string the player sees: currency.symbol, currency.position, currency.space and currency.locale. Both the legacy API economy.format(double) and the Placeholders %vault_balance_formatted% respect these 4 keys.

1. The 4 format keys


2. symbol + position + space (combinations)

Let amount = 1234567.89. Typical combinations:

3. currency.locale — separator presets

The locale only affects the numeric part (thousands grouping and decimal character). It does not touch the symbol or position. Besides presets you can pass BCP-47 directly and DecimalFormatSymbols.getInstance(locale) will resolve it:

4. Full combination: locale + symbol + position

Example for a French server:
Result:

5. Programmatic usage in Java

Your plugin can (and should) use the Economy.format() API instead of formatting manually, so it automatically respects changes in config.yml without restart:

6. Placeholders that respect currency format

PlaceholderAPI is a soft-dependency (softdepend: [PlaceholderAPI, ...]) and when present these are registered automatically:
Next: Multi-currency → and Abbreviation →.