-
Notifications
You must be signed in to change notification settings - Fork 0
Menus and GUI
RoyalBazaar's menus live in plugins/RoyalBazaar/gui/ and use the EcoMenus dialect shared across the Royal suite. Run /bazaar reload after edits.
There are three menus:
| File | Menu | What it is |
|---|---|---|
gui/bazaar_main.yml |
Main | The category picker — one button per category |
gui/bazaar_category.yml |
Category | A paged grid of the items in one category |
gui/bazaar_product.yml |
Product | A single item's buy / sell screen |
A menu file has a title, rows, an optional page mask, and a list of slots:
title: "&8Bazaar"
rows: 6
pages:
- page: 1
mask:
items:
- black_stained_glass_pane # the filler item
pattern:
- "111111111" # 1 = filler
- "100000001" # 0 = a content slot (items are placed here)
- "100000001"
- "100000001"
- "100000001"
- "111111111"
slots:
- item: wheat name:"&aFarming" # inline item: material [flags] name:"..."
lore:
- "&7Crops, seeds and enchanted drops."
- ""
- "&eClick to browse!"
row: 2
column: 3
left-click:
- id: open_menu
args:
menu: bazaar_category
category: farming
- id: play_sound
args:
sound: ui_button_click
pitch: 1
volume: 1-
maskpaints filler;0cells are content slots the category/product grid fills with live items. -
slotsare fixed, hand-placed buttons. Each is positioned by 1-basedrow/columnplaced directly on the slot (row 1 = top), and has aleft-click(and optionalright-click) list of effects run top to bottom. -
itemis the inlinematerial [hide_enchants] [hide_attributes] name:"..."syntax. Use a vanilla material, anecoitem:id, or a player head.
| Effect | Args | Does |
|---|---|---|
open_menu |
menu, category
|
Open another menu (optionally scoped to a category) |
close_inventory |
— | Close the menu |
play_sound |
sound, volume, pitch
|
Play a sound to the clicker |
send_message |
message |
Send a chat message |
rbazaar_open_product |
item |
Open the product screen for an item |
rbazaar_buy |
item, amount
|
Buy — amount may be a number or all
|
rbazaar_sell |
item, amount
|
Sell — amount may be a number or all
|
rbazaar_buy_prompt |
item |
Ask for a custom amount in chat, then buy |
The forwards/backwards paging arrows are configured with forwards-arrow / backwards-arrow blocks (an item plus row/column), and page automatically through a category's content.
Custom-textured heads work exactly the way the eco suite does them:
- item: player_head texture:<base64> # a custom head from a base64 texture value
- item: player_head head:%player% # the viewing player's own head
- item: player_head head:Notch # a specific player's headUse these in any slot's item (no eco dependency needed for the head itself). A custom eco item that is a head (ecoitem:my_head) renders its own texture automatically — just use its id.
- Add a category to the main menu = add a slot whose
open_menupoints at its id (see Categories). - Menus are read-only surfaces — clicks never move items, they only run effects.
- If a menu fails to parse, RoyalBazaar logs it and falls back to defaults; check the console after a reload.
RoyalBazaar · part of the eco suite (RoyalBank · RoyalAuctions · EconGuard) · Source on GitHub
Getting started
Using it
Help