Currencies

Every currency is one YAML file under plugins/Obfeco/currencies/. The file name is the currency id: gems.yml is the gems currency, used in commands and placeholders. There's no limit on how many you create.

Create them with /obfeco create, the Currency Manager GUI, or by dropping a new file into the folder and running /obfeco reload.

Currency file

yaml
display-name: Dollars
symbol: $
format: '%symbol%%amount%'
material: GOLD_INGOT
starting-balance: 0.0
use-decimals: true
notify-give: true
notify-take: true
category: economy
subcategory: primary
Key Default Description
display-name the id Name shown in messages, menus and the _name placeholder. MiniMessage tags work.
symbol "" Short symbol, inserted wherever the format has %symbol%.
format %amount%%symbol% How a formatted amount is written. %amount% is the formatted number.
material GOLD_INGOT Stored with the currency. The menus currently show every currency as a gold ingot.
starting-balance 0.0 Balance a player has before they've ever received this currency.
use-decimals true false rounds every displayed amount down to a whole number.
notify-give true Tell an online player when their balance goes up.
notify-take true Tell an online player when their balance goes down.
category none Category id from categories.yml. Set from the folder, see below.
subcategory none Subcategory id within that category. Set from the folder.

notify-give / notify-take cover /obfeco give, /obfeco take and changes made through the developer API. An admin's -s flag skips the message for that one command. set never sends one, pay sends its own sent/received messages instead, and changes made through Vault are silent (the Vault plugin sends its own message).

Folders

Files are sorted into folders by category and subcategory:

currencies/
├── dollars.yml              (uncategorized)
├── economy/
│   ├── coins.yml            (category: economy)
│   └── premium/
│       └── gems.yml         (category: economy, subcategory: premium)
└── events/
    └── tokens.yml

The folder decides the category. Move a file to another folder and run /obfeco reload to recategorize it. Changing the category in the editor GUI moves the file for you, and a file in the top folder with category: set is moved into its folder on the next start or reload. If two files use the same id, the first one wins and the console names the duplicate. See Categories.

Number formatting

Amounts are shortened with the suffixes from formatting in config.yml:

Balance use-decimals: true (2 places) use-decimals: false
950 950.00 950
1,500 1.50k 1k
2,750,000 2.75M 2M
3,000,000,000 3.00B 3B

Then the currency's format is applied, so with format: '%symbol%%amount%' and symbol: $, 1500 shows as $1.50k. Whole-number currencies round down at every step. Suffixes go up to quadrillions; see Main Configuration → Formatting.

The primary currency

One currency is the primary, set by vault.primary-currency in config.yml (default dollars). It's the one Vault plugins use, the one /obfeco balance shows with no arguments, and it can't be deleted. See Vault.