Create your first custom menu and open it in-game
Set up the menu file
BetterGUI builds menus from YAML files, so you don't need any coding.
1. Go to the plugin's folder on your server and open the menu folder.
2. Create a new file, for example warps.yml. The file name is the menu's name.
3. Add a menu-settings section and one button:
`yaml
menu-settings:
name: "&6Warps"
rows: 3
command: warps
spawn-button:
slot: 14
id: COMPASS
name: "&aGo to Spawn"
lore:
- "&7Click to teleport"
command:
- "console: spawn {player}"
`
name is the title, rows is the number of inventory rows, and command is the command that opens the menu. Each other top-level key is a button. slot is its position, id is the item, and command is what happens on click.
Load and test it
1. Save the file and run /bettergui reload, or restart the server.
2. Type /warps, or whatever you set as the menu command.
3. Click the button to check that it runs.
If the menu doesn't appear, check the console for YAML errors. Indentation must use spaces, not tabs, and every button needs a valid item id.