Skip to Content
MineDuels

GUIs

The menus under guis/: the folder layout, the item format, permissions and your own custom menus.

Folder: plugins/MineDuels/guis/. Reload: /md reload.

Every menu has its own YAML file, so you change one menu without touching the others. A file can be copied from the jar by deleting it and restarting. Older files in the root of the plugin folder are migrated into this folder on first start.

What is in the folder

Folder or fileMenu
queue/The four queue menus: unranked, ranked, unranked-2v2, ranked-2v2. See Queue menus
lobby-items/The lobby hotbar. See Lobby items
duel-menu.ymlThe /duel kit, arena and rounds menus
party/Party menu, members, games, teams and party duel
stats/Stats, leaderboard and history
settings//settings and its categories
social/Friends and clans
kit-editor/The kit editor, layouts, shield and trims
spectate.ymlThe spectate menus and hotbar. See Spectating
tournament.ymlThe tournament menu
server-selector.yml/servers on a network
post-match-inventory.ymlThe inventory of an opponent shown after a match
no-permission.ymlHow an item looks when the player lacks its permission
custom/Your own menus

Items

Items are the same everywhere:

kit-item:
  name: "<yellow>%kit_display%"
  lore:
    - "<gray>Waiting: <white>%in_queue%"
    - ""
    - "<green>Click to queue"
  glow: false
KeyMeaning
materialA Minecraft material
name, loreMiniMessage text with placeholders. A lore list keeps blank entries
amountStack size
glowEnchant glint
slotSlot in the menu, 0 to 53. -1 or none uses the menu's own place
permissionThe item needs this permission
no-permissionhide, or an item section that replaces some fields

Titles and lore can use <icon:name> (Icons) and conditional lines (Conditional lore). Placeholders are in the reference.

Items without the permission

rank-item:
  material: DIAMOND
  name: "<aqua>VIP kits"
  permission: myserver.vip
  no-permission:
    material: BARRIER
    name: "<red>VIP only"

A player without myserver.vip sees the barrier. With no-permission: hide the item is left out and its slot can go to the next item. The default lore line comes from menu.no-permission in messages.yml, and guis/no-permission.yml sets the layout:

name: "%name%"
lore:
  - "%lore%"
  - "%no_permission%"

Rows, slots and filler

Menus with a list of items (queue menus, duel menu) have rows, slots and a filler. A slot list accepts numbers and ranges: slots: [10, "12-16", 20]. A filler is an item that fills every empty slot. A wrong slot is reported on reload and the menu's own place is used.

Custom menus

A file guis/custom/<name>.yml is a menu of your own. The file name is the menu name.

title: "<dark_gray>Server menu"
rows: 3
permission: ""
filler:
  material: GRAY_STAINED_GLASS_PANE
  name: " "
items:
  ranked:
    slot: 11
    material: DIAMOND_SWORD
    name: "<gold>Play ranked NoDebuff"
    lore: ["<gray>Click to queue"]
    actions:
      - "[queue] ranked nodebuff"
      - "[sound] ui.button.click 1 1"
  rules:
    slot: 13
    material: BOOK
    name: "<yellow>Rules"
    actions:
      left:
        - "[message] <gray>Be nice."
        - "[close]"
      right:
        - "[command] rules"
  close:
    slots: [22]
    material: BARRIER
    name: "<red>Close"
    actions: ["[close]"]
KeyMeaning
titleThe inventory title. Default: the file name
rows1 to 6. 0 or none: as many as the items need
permissionNeeded to open the menu
fillerAn item for the empty slots
items.<key>One item. It needs slot or slots. Normal item keys apply
actionsA list for any click, or a section with the clicks left, right, shift-left, shift-right, middle and any

A shift click uses the plain click's actions when it has none of its own, and every click falls back to any.

Actions

ActionDoes
[queue] <mode> <kit>Joins a queue. Modes: unranked, ranked, unranked-2v2, ranked-2v2
[menu] <name>Opens another custom menu
[dialog] <name>Opens a dialog. See Dialogs
[command] <command>Runs a command as the player, without the slash
[console] <command>Runs a command from the console
[message] <text>Sends a message (MiniMessage)
[sound] <key> [volume] [pitch]Plays a sound, for example [sound] ui.button.click 1 1
[close]Closes the menu
[refresh]Draws the menu again

An action that cannot be read is reported on reload and skipped.

Open a custom menu

HowCommand
A player/menu <name>
An admin/md menu open <name> [player] (without a player, opens it for the admin)
An admin/md menu list
From the lobby hotbaraction: menu:<name> in guis/lobby-items/

/menu only lists menus the player may open.

Related: Lobby items, Queue menus, guis config reference.

On this page