Astral Realms Documentation Help

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_SUCCESSset-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

amount-negative

/eco set given a non-finite amount or an amount < 0.

amount-not-positive

/eco add \|give, /eco take, or /pay given a non-finite amount or an amount <= 0.

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

set-success

%target_name%, %amount%, %currency_symbol%/%currency_name%

/eco set succeeded.

set-failure

%target_name%, %amount%, %currency_symbol%/%currency_name%, %reason%

/eco set failed (e.g. invalid amount).

deposit-success

%target_name%, %amount%, %currency_symbol%/%currency_name%

/eco add \|give succeeded.

deposit-failure

%target_name%, %amount%, %currency_symbol%/%currency_name%, %reason%

/eco add \|give failed.

withdraw-success

%target_name%, %amount%, %currency_symbol%/%currency_name%

/eco take succeeded.

withdraw-failure

%target_name%, %amount%, %currency_symbol%/%currency_name%, %reason%

/eco take failed (e.g. insufficient funds).

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

balance-other

%target_name%, %balance%, %currency_symbol%/%currency_name%

/eco balance <player> <currency> succeeded.

balance-error

%target_name%, %currency_symbol%/%currency_name%

/eco balance failed to read the target's balance (async lookup threw).

balance-others

%target_name%, %balance%, %currency_symbol%/%currency_name%

/balance others <player> <currency> succeeded (requires economy.balance.others).

balance-others-error

%target_name%, %currency_symbol%/%currency_name%

/balance others failed to read the target's balance.

Self balance

Key

Placeholders

When

balance-self

%player_name%, %balance%, %currency_symbol%/%currency_name%

/balance or /balance <currency> succeeded.

balance-self-error

none

/balance failed to read the caller's own balance — sent with no placeholder container at all.

balance-no-default-currency

none

/balance with no argument, but no currency in currencies.yml is marked default: true.

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

reloading

Reload started.

reload-success

config.yml, currencies.yml, and messages.yml re-loaded without error.

reload-failure

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

pay-self

— (no container)

Sender targeted themself.

pay-no-default-currency

— (no container)

No currency in currencies.yml is marked default: true, so /pay has nothing to move.

pay-untransferable

The default currency's transferable flag is false.

pay-success-sender

Sender-side confirmation once the transfer succeeds.

pay-received

Recipient-side notification, sent alongside pay-success-sender.

pay-insufficient-funds

Sender's balance can't cover the transfer.

pay-account-not-found

The target has no account row for that currency yet.

pay-failed

%reason%

Any other failure, e.g. invalid amount (a sub-tick amount that rounds to zero at the stored scale).

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

notification-gain

%amount%, %currency_symbol%/%currency_name%

One currency's net change in the window was positive.

notification-loss

%amount%, %currency_symbol%/%currency_name%

One currency's net change in the window was negative.

notification-format

%content%

Wraps the joined gain/loss segments before the action bar is sent.

Shared

Key

When

unexpected-error

Catch-all for an async operation (/eco set \|add \|give \|take, /pay) that failed with an uncaught exception rather than a normal MutationResult failure.

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.

Result constant

%reason% text

Meaning

INSUFFICIENT_FUNDS

insufficient funds

The withdraw/transfer guard would take the balance below zero.

ACCOUNT_NOT_FOUND

account not found

The account row doesn't exist — the ledger never provisions accounts.

INVALID_AMOUNT

invalid amount

A null/non-finite amount, a negative /eco set target, a non-positive delta, or an amount that rounds to zero at the stored column scale.

Placeholders

Placeholder

Source

Appears in

%amount%

The command's numeric argument, formatted with NumberFormatUtils.formatWithSpaces.

Admin edit and pay-* keys (see per-key tables above).

%balance%

The account's current balance, same formatting.

balance-other, balance-others, balance-self.

%currency_symbol%/%currency_name%

The EconomyCurrency placeholder (symbol/name sub-keys of the currency registration).

Every key that has a currency in scope.

%target_name%

The MinecraftPlayer target's name, via the target placeholder redirect.

Admin edits, balance checks, pay-* keys (the recipient).

%player_name%

The AstralCore player namespace on the sender's own placeholder container.

balance-self (the caller), pay-* keys (the payer — including on pay-received, as seen by the recipient).

%reason%

MutationResult.Result.label() — see Failure reasons.

set-failure, deposit-failure, withdraw-failure, pay-failed.

%content%

The joined notification-gain/notification-loss components for the window.

notification-format only.

See Placeholders for the %economy_*% namespace exposed to other plugins and menus — a separate surface from the message-internal placeholders documented here.

Last modified: 25 July 2026