# Economy Integration The Auction House and paid crates need a currency. CelestialCosmetics is **not** tied to any specific economy plugin — pick a mode in `config.yml` under `economy.economy-mode`. ```yaml economy: economy-mode: vault # vault | eddungeons | commands currency: credits # currency id (eddungeons / commands) currency-display: Credits balance-placeholder: '%some_balance_placeholder%' # commands mode only commands: give: '{currency} give {player} {amount}' take: '{currency} remove {player} {amount}' ``` If the chosen mode can't start (plugin missing, placeholder not resolving…), purchases are **disabled** with a clear console error — the plugin never silently hands out free items. ## Modes ### `vault` Hooks into **any Vault-compatible economy** (EssentialsX, CMI, and most others). This is the Minecraft standard. Note: Vault only exposes the server's **main balance**, so the `currency` field is ignored in this mode. ### `eddungeons` Direct hook into the **EdDungeons Currency API**, for custom currencies (credits, gems…). The `currency` field selects which one. Individual crates can charge a **different** currency with their own `currency:` field. ### `commands` Works with **literally any** currency plugin: read the balance from a placeholder and charge/pay with console commands. Offline sellers are paid on their next login. ## Ready-made `commands` configs **PlayerPoints:** ```yaml economy: economy-mode: commands balance-placeholder: '%playerpoints_points%' commands: give: 'points give {player} {amount}' take: 'points take {player} {amount}' ``` **Any credits-style plugin (e.g. RivalCredits):** set `balance-placeholder` to its balance placeholder and `commands.give` / `commands.take` to its give/take commands. **Vault money via commands (EssentialsX):** ```yaml economy: economy-mode: commands balance-placeholder: '%vault_eco_balance%' commands: give: 'eco give {player} {amount}' take: 'eco take {player} {amount}' ``` ## Placeholders in templates - `{currency}` → the currency id - `{player}` → the player name - `{amount}` → the amount (plain number) ## Note for networks This plugin syncs cosmetics across servers ([Network Sync](Network-Sync)), but **not** currency — your economy plugin must be network-aware itself for balances to match across servers. --- Next: [GUI Customization](GUI-Customization)