Messages
plugins/AstralEconomy/messages.yml is a flat MiniMessage map — no nested sections, just kebab-case-key: "value" pairs — loaded on startup (and on /eco reload) straight into the EconomyMessages enum. Each YAML key maps to the enum constant of the same name: the loader lowercases the constant and turns underscores into hyphens (SET_SUCCESS → set-success), so every key below has a 1:1, order-independent counterpart in EconomyMessages. A key missing from the file is logged as a warning and that constant is left unset.
Values resolve the global AstralCore variable tags (<info>, <success>, <warning>, <error>) plus whatever %placeholders% the sending code registers for that message (listed per key below — this is everything available, not just what the shipped value happens to reference). The shipped file ships pre-translated to French — the key name, not the French text, is the stable identifier for documentation and cross-linking purposes; only the values change with translation.
Amount validation
Both keys are sent from the command layer before any database call — a rejected amount never reaches the ledger.
Key | When |
|---|---|
|
|
|
|
Admin balance edits
Sent by /eco set/add \|give/take (see Commands). Every pair shares one respond() helper, so the placeholder set is identical across set/deposit/withdraw: on success it sends the -success key; on failure the -failure key, with %reason% added — see Failure reasons below.
Key | Placeholders | When |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Balance checks
Three independent pairs cover the three places a balance can be read: an admin checking any player (/eco balance), a permissioned player checking another player (/balance others), and a player checking their own balance.
Key | Placeholders | When |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Self balance
Key | Placeholders | When |
|---|---|---|
|
|
|
| none |
|
| none |
|
Configuration reload
Sent by /eco reload in sequence: reloading first, then exactly one of reload-success/reload-failure once loadConfiguration() returns or throws.
Key | When |
|---|---|
| Reload started. |
|
|
| Reload threw — check console for the stack trace. |
Player transfers (/pay)
/pay <player> <amount> always moves the configured default currency — see Currencies § The default currency. pay-self and pay-no-default-currency are sent with no placeholder container. Every other key below shares one container built once per /pay call — %player_name% (the sender, from their own placeholder context — not the recipient), %target_name% (the recipient), %currency_symbol%/%currency_name%, and %amount% — with %reason% added only for pay-failed. pay-received is rendered from that same sender-context container but delivered to the recipient through ChatService, so %player_name% on it is genuinely useful (the payer's name) while %target_name% on it is self-referential (the recipient's own name) and rarely needed.
Key | Extra placeholders beyond the shared set | When |
|---|---|---|
| — (no container) | Sender targeted themself. |
| — (no container) | No currency in |
| — | The default currency's |
| — | Sender-side confirmation once the transfer succeeds. |
| — | Recipient-side notification, sent alongside |
| — | Sender's balance can't cover the transfer. |
| — | The target has no account row for that currency yet. |
|
| Any other failure, e.g. |
Action-bar notifications
notification-gain and notification-loss render one currency's net change within a 500 ms debounce window (see Overview § Action-bar notifications); every currency that netted non-zero in the window becomes one <green>+</green>/<red>-</red> segment, and the segments are joined with a space into a single component. That joined component is passed as %content% into notification-format, whose shipped value wraps it in <font:hud:shift_1> — a custom resource-pack font glyph tag. The final action bar sent to the player is an AstralHud background component (built by BackgroundService#buildBackground, sized to the rendered width of the joined gain/loss text) followed by the notification-format component, so the background lines up under the text regardless of how many currencies changed.
Key | Placeholders | When |
|---|---|---|
|
| One currency's net change in the window was positive. |
|
| One currency's net change in the window was negative. |
|
| Wraps the joined gain/loss segments before the action bar is sent. |
Shared
Key | When |
|---|---|
| Catch-all for an async operation ( |
Failure reasons
Every %reason% placeholder (set-failure, deposit-failure, withdraw-failure, pay-failed) is MutationResult.Result.label() — the enum constant name lowercased with underscores turned into spaces. The database is the sole source of truth for these outcomes; no command-layer code decides them.
|
| Meaning |
|---|---|---|
|
| The withdraw/transfer guard would take the balance below zero. |
|
| The account row doesn't exist — the ledger never provisions accounts. |
|
| A null/non-finite amount, a negative |
Placeholders
Placeholder | Source | Appears in |
|---|---|---|
| The command's numeric argument, formatted with | Admin edit and |
| The account's current balance, same formatting. |
|
| The | Every key that has a currency in scope. |
| The | Admin edits, balance checks, |
| The AstralCore |
|
|
|
|
| The joined |
|
See Placeholders for the %economy_*% namespace exposed to other plugins and menus — a separate surface from the message-internal placeholders documented here.