Skip to Content
MineDuels

Custom menu examples

Copy-paste custom menus, lobby hotbar items and dialogs with queue, command, sound and sub-menu actions.

Custom menus live in plugins/MineDuels/guis/custom/<name>.yml. The file name is the menu name. After saving, run /md reload. The key reference is GUIs.

Game mode selector

A 3 row menu that queues a player into a kit of your choice.

# guis/custom/modes.yml
title: "<dark_gray>Choose a mode"
rows: 3
filler:
  material: GRAY_STAINED_GLASS_PANE
  name: " "
items:
  nodebuff:
    slot: 10
    material: SPLASH_POTION
    name: "<aqua>NoDebuff"
    lore: ["<gray>Left click: unranked", "<gray>Right click: ranked"]
    actions:
      left:
        - "[queue] unranked nodebuff"
        - "[sound] ui.button.click 1 1"
        - "[close]"
      right:
        - "[queue] ranked nodebuff"
        - "[close]"
  sumo:
    slot: 12
    material: SLIME_BALL
    name: "<yellow>Sumo"
    actions:
      left: ["[queue] unranked sumo", "[close]"]
      right: ["[queue] ranked sumo", "[close]"]
  boxing:
    slot: 14
    material: DIAMOND_SWORD
    name: "<gold>Boxing"
    actions:
      any: ["[queue] unranked boxing", "[close]"]
  more:
    slot: 16
    material: NETHER_STAR
    name: "<light_purple>More modes"
    actions: ["[menu] more-modes"]
  close:
    slot: 22
    material: BARRIER
    name: "<red>Close"
    actions: ["[close]"]

Open it with /menu modes, or give players an item that opens it (below).

Add an item to a lobby hotbar set. See Lobby items.

# guis/lobby-items/lobby.yml
modes:
  slot: 6
  material: COMPASS
  name: "<green>Modes <gray>(right click)"
  lore: ["<gray>Pick a game mode"]
  glow: false
  action: menu:modes

Permission locked menu and items

# guis/custom/vip.yml
title: "<gold>VIP menu"
rows: 3
permission: "myserver.vip"
items:
  kit:
    slot: 13
    material: DIAMOND
    name: "<aqua>VIP kit"
    permission: "myserver.vip.kit"
    no-permission:
      material: BARRIER
      name: "<red>VIP kit"
      lore: ["<gray>Buy a rank to unlock"]
    actions: ["[queue] ranked vipkit"]

A player without myserver.vip cannot open the menu. A player with it but without myserver.vip.kit sees the barrier item.

# guis/custom/info.yml
title: "<dark_gray>Server info"
rows: 3
items:
  rules:
    slot: 11
    material: BOOK
    name: "<yellow>Rules"
    actions:
      - "[message] <gray>1. Be nice <newline>2. No cheating"
      - "[close]"
  discord:
    slot: 13
    material: PAPER
    name: "<blue>Discord"
    actions:
      - "[message] <blue><click:open_url:'https://discord.gg/yourinvite'>Click to join our Discord</click>"
      - "[close]"
  shop:
    slot: 15
    material: EMERALD
    name: "<green>Shop"
    actions:
      left: ["[command] shop"]
      right: ["[console] say The shop is open"]

[command] runs as the player. [console] runs from the console.

# guis/custom/hub.yml
title: "<dark_gray>Hub"
rows: 3
items:
  games:
    slot: 11
    material: DIAMOND_SWORD
    name: "<gold>Games"
    actions: ["[menu] modes"]
  info:
    slot: 15
    material: BOOK
    name: "<yellow>Info"
    actions: ["[menu] info"]
# guis/custom/modes.yml, add a back button
  back:
    slot: 18
    material: ARROW
    name: "<gray>Back"
    actions: ["[menu] hub"]

Ask before a click: a dialog

On Minecraft 1.21.6 and newer, [dialog] <name> opens a dialog from dialogs/. See Dialogs.

items:
  settings:
    slot: 13
    material: COMPARATOR
    name: "<white>Settings"
    actions: ["[dialog] settings"]

Open menus from commands

WhoCommand
A player/menu modes
An admin for someone else/md menu open modes Steve
Listing/md menu list

Related: GUIs, Lobby items, Queue menu examples.

On this page