shop_definition
Defines a shop — misc entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | shop_definition |
| Type | Misc |
| Color | Green |
| Icon | mdi:cart |
Description
Declarative definition of a shop and its items. Uses layout pool + mainLayoutId for full declarative control via GUI Extension, using shop_button: prefixed placeholders for navigation and item slots. Sub-menus (buy/sell options) are another layout in the same [layoutPool], picked by [subMenuLayoutId].
Fields
| Field | Type | Description |
|---|---|---|
title | String | Inventory title displayed to players. Supports color codes and placeholders. |
rows | Int | Number of inventory rows (1-6). Used to determine inventory size. |
fillerItem | Var<Item> | Item used to fill empty slots. |
priceLore | List<String> | Lore lines appended to each item to display prices. Placeholders: {buy}, {sell}. Supports color codes and placeholders. |
currency | CurrencyType | Economy provider used for pricing. |
balancePlaceholder | String | Placeholder used to fetch player balance when currency is placeholder. |
addCommand | String | Command to add currency. {player} and {amount} will be replaced. |
removeCommand | String | Command to remove currency. {player} and {amount} will be replaced. |
taxRate | Double | Tax percentage applied on transactions (0.0 = no tax, 10.0 = 10% tax). |
taxMode | TaxMode | How taxes are applied: PER_TRANSACTION (global rate) or PER_ITEM (per-item override via taxRateOverride). |
reset | ResetPolicy | Policy determining when stock resets. Supports Cron, Interval, Daily, Weekly, and Monthly. |
items | List<ShopItemConfig> | Items available in the shop. |
itemPools | List<Ref<ShopPoolEntry>> | Item pools referenced by this shop. Pool items are merged into the shop display. |
layoutPool | List<SimpleLayoutData> | Layout pool for declarative menu design. Holds every layout this shop uses — the main menu and the buy/sell sub-menu are both selected out of this pool by id. Shop menus are simple grids: shop items are placed at SHOP_ITEM markers and buttons are shop_button: tagged slots. |
mainLayoutId | String | ID of the main layout within the layout pool to display. |
subMenuLayoutId | String | ID of the buy/sell sub-menu layout within the layout pool. Uses shop_button: prefixed placeholders. Leave empty for no sub-menu. |
subMenuTitle | String | Title for the sub-menu. Supports color codes and placeholders. {item_name} placeholder available. |
interactionConfig | ShopInteractionConfig | Click-type configuration for all shop interactions. Customize which mouse buttons trigger buy/sell/submenu actions. |
globalPlayerLimit | Int | Global limit per player across all items in this shop. 0 = unlimited. |
globalBuyLimit | Int | Global buy limit across all items (all players combined). 0 = unlimited. |
globalSellLimit | Int | Global sell limit across all items (all players combined). 0 = unlimited. |
defaultRefreshTicks | Int | Default refresh rate in ticks for item displays. 20 = 1 second. |
perPlayer | Boolean | If true, each player has their own independent shop state (stock, limits). |
buySound | Sound? | Sound played on successful purchase. |
sellSound | Sound? | Sound played on successful sale. |
deniedSound | Sound? | Sound played when a transaction is denied. |
infoMessage | List<String> | Messages shown when the information button is clicked. Supports color codes, placeholders and multiline. |
buyAmountPrompt | String | Message shown when entering a custom buy amount. Supports color codes and placeholders. |
sellAmountPrompt | String | Message shown when entering a custom sell amount. Supports color codes and placeholders. |
amountConfirmButton | String | Label used for the confirmation button in amount dialogs. Supports color codes and placeholders. |
amountInputLabel | String | Label for the custom amount input. Supports color codes and placeholders. |
amountInputPlaceholder | String | Placeholder text inside the custom amount input. Supports color codes and placeholders. |
amountInputWidth | Int | Width of the custom amount input field. |
amountInputMaxLength | Int | Maximum allowed length for the custom amount input. |
invalidAmountMessage | String | Message shown when the entered custom amount is not a positive whole number. |
cannotAffordMessage | String | Message when the player cannot afford a purchase. Placeholders: {amount}, {price}. |
inventoryFullMessage | String | Message when the player's inventory is full. Placeholders: {amount}, {price}. |
purchaseMessage | String | Message sent after a successful purchase. Placeholders: {amount}, {price}. |
cannotSellMessage | String | Message when the item cannot be sold. Placeholders: {amount}, {price}. |
notEnoughItemsMessage | String | Message when the player doesn't have enough items to sell. Placeholders: {amount}, {price}. |
sellMessage | String | Message sent after a successful sale. Placeholders: {amount}, {price}. |
noEconomyMessage | String | Message when no economy provider is available. |
criteria | List<@Contextual Criteria> | Criteria that must be met to access the shop. |
criteriaFailMessage | String | Message when the required criteria are not met. |
lockedItem | Var<Item> | Item displayed when a shop item is locked. |
limitReachedMessage | String | Message when a player reaches the purchase limit for an item. |
priceFormat | String | Price format template. Placeholders: {amount} = formatted price, {currency} = currency symbol. Default: {amount} |
currencySymbol | String | Currency symbol used in price display. Example: $, €, pts. |
artifact | Ref<ShopArtifact> | Artifact used for persistent storage and synchronisation. |
Usage Example
- entry: shop_definition
name: "Defines a shop"
title: ""
rows: 0
fillerItem: ""
priceLore: []
currency: ""
balancePlaceholder: ""
addCommand: ""
removeCommand: ""
taxRate: 0
taxMode: ""
reset: ""
items: []
itemPools: []
layoutPool: []
mainLayoutId: ""
subMenuLayoutId: ""
subMenuTitle: ""
interactionConfig: 0
globalPlayerLimit: 0
globalBuyLimit: 0
globalSellLimit: 0
defaultRefreshTicks: 0
perPlayer: false
buySound: ""
sellSound: ""
deniedSound: ""
infoMessage: []
buyAmountPrompt: ""
sellAmountPrompt: ""
amountConfirmButton: ""
amountInputLabel: ""
amountInputPlaceholder: ""
amountInputWidth: 0
amountInputMaxLength: 0
invalidAmountMessage: ""
cannotAffordMessage: ""
inventoryFullMessage: ""
purchaseMessage: ""
cannotSellMessage: ""
notEnoughItemsMessage: ""
sellMessage: ""
noEconomyMessage: ""
criteria: []
criteriaFailMessage: ""
lockedItem: ""
limitReachedMessage: ""
priceFormat: ""
currencySymbol: ""
artifact: ""