Configuration
How to create custom GUI menus in Minecraft
Create inventory GUI menus with buttons that run commands, open other menus and play sounds, using sofyCore's menus.yml.
- Menus
- GUI
GUI menus in Minecraft are chest inventories whose items act as buttons. A menu has a title, a number of rows (9 slots each) and items placed in slots.
Plan the layout
Slots are numbered from 0, left to right and top to bottom. In a 3-row menu, the middle row is slots 9–17 and slot 13 is the center.
Write the menu
custom:
hub:
title: "&8Server hub"
rows: 3
permission: ""
items:
survival:
slot: 11
material: "GRASS_BLOCK|GRASS"
name: "&aSurvival"
lore: ["&7Click to play"]
actions: ["[player] server survival", "[close]"]
shop:
slot: 15
material: "GOLD_INGOT"
glow: true
name: "&6VIP shop"
actions: ["[open] vip-shop"]GRASS_BLOCK|GRASS lists a modern material and its legacy name: the first one that exists on the server is used.
Open it
Players open it with /menu hub if they have sofycore.menus.open.hub (or the menu's permission is empty).
Actions available
[player], [console], [message], [sound], [open] and [close]. Use right-actions for a different behavior on right click.