Astral Realms Documentation Help

Messages

plugins/AstralShop/messages.yml is a flat kebab-case-key: "value" map — 13 keys, no nested sections — loaded on enable and on /shop reload straight into the ShopMessages enum (AstralShop#loadConfigurationloadEnum("messages.yml", ShopMessages.class)). Each YAML key maps 1:1 to the enum constant of the same name: the loader lowercases the constant and turns underscores into hyphens (ITEM_NOT_SELLABLEitem-not-sellable), so every key below has a stable, order-independent counterpart in ShopMessages.

Values are ComponentWrapper — MiniMessage, so color/formatting tags (<red>, <gold>, etc.) are supported alongside the %placeholder% tokens documented below.

Default file

# Sell item-not-sellable: "This item cannot be sold." item-sold: "You have successfully sold x%amount% %item_name% for $%price%." not-enough-items: "You do not have enough %item_name% to sell." nothing-to-sell: "You have no items available to sell." # Sell All/Hand sold-all-items: "You have sold %amount% for %earnings%$." nothing-to-sell-in-inventory: "You have no items in your inventory to sell." nothing-to-sell-in-hand: "You have no items in your hand to sell." # Buy item-not-buyable: "This item cannot be purchased." not-enough-funds: "You do not have enough funds to complete this purchase." item-bought: "You have successfully purchased x%amount% %item_name% for $%price%." inventory-full: "Your inventory is full. Please make space before buying more items." # Misc shop-not-found: "Shop not found." unexpected-error: "An unexpected error occurred. Please try again later."

Sell

Sent from PaperShopService#sell — the flow behind the [sell-shop-item] action and the /sellhand//sell command's fallback lookup.

Key

Placeholders registered

Sent when

item-not-sellable

none

A [sell-shop-item] call targets an item whose sellable flag is false.

item-sold

%amount%, %price%, %item_*%

A sell completes and notify is true (every direct sell; suppressed for the per-item sells folded into sold-all-items).

not-enough-items

%item_*% only (no %amount%/%price%)

The player's inventory holds fewer than the requested amount of the item's display stack.

nothing-to-sell

none

sellAll(player, shopId) (the shop-scoped [sell-all] action) finds no sellable item the player is holding any of, in that one shop.

Sell All / Hand

Key

Placeholders registered

Sent when

sold-all-items

%amount%, %earnings%

Either sellAll overload (/sellall, or the shop-scoped [sell-all] action) sold at least one item; reports one combined total instead of a message per item.

nothing-to-sell-in-inventory

none

/sellallPaperShopService#sellAll(player) returns false (nothing sellable, across any shop, anywhere in the inventory).

nothing-to-sell-in-hand

none

/sellhand (/sell) with an empty/air main hand, or no loaded shop marking the held item sellable; also the fallback in PaperShopService#sell(player, itemStack) when no shop/item match is found.

Buy

Sent from PaperShopService#buy — the flow behind the [buy-shop-item] action.

Key

Placeholders registered

Sent when

item-not-buyable

none

The targeted item's buyable flag is false.

not-enough-funds

none

EconomyService#withdraw fails or errors (insufficient balance).

item-bought

%amount%, %price%, %item_*%

The withdraw succeeds and the item is given (or its buy-actions run).

inventory-full

none

give-item is true and the player doesn't have space for the purchased stack — checked before the funds are withdrawn.

Misc

Key

Placeholders registered

Sent when

shop-not-found

none

buy/sell/sellAll(player, shopId) is called with a shopId that isn't a currently-loaded shop.

unexpected-error

none

An async economy call (withdraw/deposit) completes with an error, or the EconomyService isn't registered at all.

Placeholders

Placeholder

Source

Appears in

%amount%

The transaction quantity, registerDirect("amount", amount) — a raw int, unformatted.

item-sold, item-bought, sold-all-items.

%price%

The event's final settled price (ShopBuyEvent#price()/ShopSellEvent#price() — base price × amount, then per-player modifiers, and rewritable by a listener before the economy call), registerDirect("price", ...) — a raw double, unformatted.

item-sold, item-bought.

%earnings%

The summed settled price across every item folded into one sellAll call, registerDirect("earnings", totalEarned) — a raw double, unformatted.

sold-all-items.

%item_*%

The sold/bought ShopItem itself, registered whole via registerPlaceholder(item) under its item namespace (a ComplexPlaceholder). Sub-keys: %item_id%, %item_buyPrice%, %item_sellPrice% (both modifier-adjusted, player-context only), %item_buyable%, %item_sellable%, %item_giveItem%, and %item_display% (chains into an item-stack placeholder — e.g. %item_display_name%, %item_display_amount%, %item_display_material%; see Placeholders).

item-sold, not-enough-items, item-bought.

%player_*%/ any installed PlaceholderAPI expansion

Every container built by AstralPaperAPI.createPlaceholderContainer(player) registers the sending player under player and falls back to a PlaceholderAPI adapter for anything else unresolved. Not used by any shipped default, but available in every message on this page.

All (available, unused by defaults).

See also

  • Commands/shop reload, /sellall, /sellhand (/sell).

  • Actions[buy-shop-item], [sell-shop-item], [sell-all], the entry points that trigger the buy/sell messages above.

  • Placeholders — the full %item_*%/%shop_*% namespace shapes.

  • Developer APIShopBuyEvent#price()/ShopSellEvent#price(), which back %price% and can be rewritten before the message is sent.

Last modified: 25 July 2026