TMDevelopmentTinulica & Maiky

Shops and menus

Shops and store

Every .yml file in shops/ is a menu: a shop, a category or a hub. Open it with:

  • /tokens shop <name>
  • its own open-commands (for example open-commands: [ranks] → /ranks)
  • [open] <name> from another menu ([back] goes back to the menu it came from)

Example: a hub (main.yml) with Ranks and Items buttons, each opening its own shop.

Option
enabledfalse = menu off for everyone
titletitle of the menu (colors and gradients allowed)
rows1–6 rows (9–54 slots)
open-commandscommands that open it
open-permissionpermission to open it ("" = everyone)
itemsbuttons and products
decorationsglass and borders, drawn under the items (a border never covers a button)
textsthe lines added under every product (price, "click to buy"...)

Item options

Option
slots"4", "19-25", "0-8,45-53" (row 1 = 0–8, row 2 = 9–17...)
materialDIAMOND · head:{player} · head:Notch · texture:<minecraft-heads value> · ia:<id> (ItemsAdder)
name, lore, amount, glow, custom-model-datahow it looks
admin-onlyplayers don't see it
updateredraw every second (live placeholders)
actionswhat a click does (see Actions and checks); [LEFT] / [RIGHT] in front = only that click
show-if / hide-ifchecks: show the item only when true / hide it when true
prioritymore items on one slot: the first visible one (lowest priority) is shown

Products (an item with a price)

Option
pricetokens it costs
giveitems given: "DIAMOND 3", a full item (material, name, lore...) or the exact item saved by the editor
commandsconsole commands run after paying ({player}, {uuid})
confirmtrue = a confirm menu opens first
limittimes each player can buy it
limit-resetnever, daily, weekly, monthly
stockpieces for the whole server (all servers with MySQL)
stock-resetlike limit-reset
permissionneeded to buy it
salefalse = never discounted by /tokens sale

Texts usable in products: {price} {original_price} {sale} {limit} {bought} {left} {stock} {stock_left} {missing} {tokens}.

Example: a ranks shop

title: "<gradient:#8e2de2:#c471f5>Ranks</gradient>"
rows: 3
open-commands: [ranks]
items:
  vip:
    slots: "11"
    material: EMERALD
    name: "&aVIP"
    price: 1500                 # tokens
    confirm: true               # confirm menu first
    limit: 1                    # once per player
    hide-if: ["[has_permission] group.vip"]
    commands: ["lp user {player} parent add vip"]
  back:
    slots: "22"
    material: ARROW
    name: "&c← Back"
    actions: ["[back]"]
decorations:
  - slots: "0-10,12-21,23-26" material: PURPLE_STAINED_GLASS_PANE name: " "

Shops from FlareTokens 3.x (menu_title, size, display_name, slot, click_commands, [buy(tokens)], view_requirements...) work as they are.

Clicks

Menus react to left, right and shift clicks only. Q, Ctrl+Q, number keys, F, middle and double click do nothing, unless an item asks for that click on purpose ([DROP], [CONTROL_DROP], [NUMBER_KEY], [MIDDLE], [DOUBLE_CLICK], [SWAP_OFFHAND] in front of an action). Items can never be taken out of a menu. (4.0.1+)

Actualizat ultima data pe 25 octombrie 2026