Placeholders
AstralPlayerShops registers one global namespace and four contextual namespaces with AstralCore. For the placeholder syntax itself (%a_b_c%, %a_{b_c}%, $e(...)) see Placeholders.
A note on menu/dialog prefixes
The tables below document each model's own sub-keys — its ComplexPlaceholder.get switch. The full placeholder string to type in a config, though, depends on how that object reached the render, per AstralCore's resolution order:
Sign templates.
ShopService#updateSignBlockbuilds a one-offPlaceholderContainerand calls.registerPlaceholder(shop)directly — the shop sits at the top-levelshopnamespace, so%shop_price%is written as-is.A single object passed into a menu/dialog open call (
Map.of("shop", shop, "stats", stats, ...)) is reached through AstralCore'sparametersnamespace (plural —Menu/ComputedDialogboth register aParametersPlaceholderkeyed"parameters"):%parameters_shop_price%,%parameters_stats_dailyEarnings%.One object per row of a layout/list built from an
ItemProvider(e.g. thetransactionsorentrieslist) is reached through theparameternamespace (singular —LayoutInstance/ComputedDialogwrap each row in aParameterPlaceholderalongside%parameter_index%/%parameter_slot%):%parameter_transaction_id%,%parameter_entry_item%.
Each section's Availability line below states which form applies.
playershops_* (global)
Registered on RootPlaceholderContainer (PSPlaceholders, AstralPlayerShops#onEnable), so it resolves anywhere a placeholder container is evaluated across the network — no menu parameter needed.
Placeholder | Type | Description |
|---|---|---|
| Boolean | The context player's away-recap notification preference ( |
Availability. Root namespace — %playershops_recapNotification%, unprefixed, anywhere a Player is the evaluation context (messages, menus, dialogs). See Activity Recaps.
shop_* (contextual)
PlayerShop is itself a ComplexPlaceholder (namespace shop). A bare %shop% (no sub-key) resolves to the PlayerShop instance itself.
Placeholder | Type | Description |
|---|---|---|
| UUID | Primary key. |
| MinecraftPlayerPlaceholder | Network-aware handle on the owner, keyed by |
| String | Owner's player name, captured at shop creation — not live-updated on a later name change. |
| int | Price per single item. |
| String | Base |
| ShopType |
|
| Component | The |
| ItemStackPlaceholder | The full traded item, deserialized from stored bytes. Chains into the standard item sub-keys — |
| LocationPlaceholder | The shop's container location — chain |
| Boolean | Whether any town member with |
| Boolean | Whether the shop's proceeds route through a town's economy account rather than the owner's personal balance — |
Availability. Registered directly (%shop_*%) on the shop's wall sign — see Sign lines and The sign. Passed as a menu-open parameter (%parameters_shop_*%) into playershops-main (MenuService#openShopMenu), playershops-history (MenuService#openTransactionHistoryMenu), and the playershops-buy/playershops-sell amount-picker menus opened by ShopService#buy/#sell — see Interacting with a shop.
entry_* (contextual)
ShopRecap is a ComplexPlaceholder (namespace entry) — a record representing one item's aggregated activity within a recap window. A bare %entry% resolves to the record itself.
Placeholder | Type | Description |
|---|---|---|
| UUID | The originating shop's id. Always |
| ItemStackPlaceholder | The traded item — the key the rows were grouped by. |
| ShopType |
|
| Component | The |
| int | Total quantity traded for this item across the window (summed across all matching shops). |
| double | Total coin value for this item across the window (summed across all matching shops). |
Availability. Rendered per-row (%parameter_entry_*%) inside the entries layout of the playershops-daily-recap (/ps recap) and playershops-absent-recap (login prompt) dialogs. See Activity Recaps → Recap computation for the full grouping behavior and the earned/spent totals computed alongside the entry list.
transaction_* (contextual)
ShopTransaction is a ComplexPlaceholder (namespace transaction) — one persisted row per completed trade. A bare %transaction% resolves to the record itself. Rows sort newest-first (ShopTransaction implements Comparable, by createdAt descending).
Placeholder | Type | Description |
|---|---|---|
| UUID | Primary key. |
| MinecraftPlayerPlaceholder | Network-aware handle on the buyer, keyed by |
| int | Quantity traded. |
| double | Total coin value of the transaction (already |
| TimePlaceholder | When the transaction was recorded. Chain |
Availability. Rendered per-row (%parameter_transaction_*%) inside the transactions layout of the playershops-history menu (opened via open-playershops-transactions). Rows are cached per shop for 5 minutes, and rows older than a week are purged every 12 hours (TransactionRepository).
stats_* (contextual)
ShopStats is a ComplexPlaceholder (namespace stats) — a record of rolling 24h/7d aggregates for one shop, computed with a single SUM/COUNT query over that shop's transactions rows (COALESCE(..., 0) when there are no matching rows) and cached per shop for 5 minutes. A bare %stats% resolves to the record itself.
Placeholder | Type | Description |
|---|---|---|
| double | Sum of |
| double | Sum of |
| int | Count of transactions from the last 24 hours. |
| int | Count of transactions from the last 7 days. |
| int | Sum of |
| int | Sum of |
Availability. Passed as a menu-open parameter (%parameters_stats_*%) into playershops-main alongside %parameters_shop_*% — MenuService#openShopMenu loads both together via TransactionService#findStatsByShopId before opening.
stock (sign-only)
%stock% is a direct placeholder, not a namespaced/complex one — it's computed live and registered only while rendering a shop's wall sign (ShopService#updateSignBlock), alongside the shop's own shop_* fields in the same one-off container:
Shop type | Value |
|---|---|
| Items currently available in the container to buy, live-counted with |
| Empty slots left in the container to sell into, via |
The sign refreshes on shop creation, after every buy/sell, and on the periodic sign-refresh tick (see Sign & stock refresh). The shipped config.yml uses it as:
Availability. Root namespace, sign templates only (%stock%, unprefixed) — not reachable from any menu, dialog, or message.
Context summary
Namespace | Written as | Where |
|---|---|---|
|
| Anywhere with a |
|
| The shop's wall sign. |
|
|
|
|
|
|
|
|
|
|
|
|
|
| The wall sign renderer only (formatted, stock-or-message form). |