ParsedGui example
YAML structure
id: my_gui
title: "<gold>My Shop"
size: 54 # must be a multiple of 9
on_open: # optional — action list to run when GUI opens
- "[sound] UI_BUTTON_CLICK;1;1"
on_close: # optional — action list to run when GUI closes
- "[message] <gray>Closed the shop."
Items:
my_item:
material: DIAMOND
slot: 13 # single slot
display_name: "<aqua>Buy Diamond"
lore:
- ""
- " <gray>Click to purchase"
- ""
on_click:
any: # fires on every click type
- "[sound] UI_BUTTON_CLICK;1;1"
- "[player] buy diamond"
left: # fires only on left click
- "[message] <green>Left clicked!"
shift_left:
- "[message] <yellow>Shift+Left!"Opening from code
Runtime placeholders
Click handlers from code
Passing the GUI into actions via ActionContext
Slot priority & view_requirements
Refreshing the GUI
Extending ParsedGui
Last updated