Skip to content

Module Menu

j-gaertig-co-dev edited this page Aug 13, 2026 · 2 revisions

Menu Module

Config file: modules/menu.yml — current version: 1.0view current default on GitHub Enable via config.ymlmodules.menu: true

Features

  • Fully config-driven GUI menus — no code changes needed to add a new menu.
  • Each menu has a MiniMessage title, an inventory size (9–54, must be a multiple of 9), an optional fill material for empty slots, and per-slot items.
  • Each item can, on click:
    • run one or more commands as the player (%player% supported),
    • play a sound,
    • show a message to the clicking player,
    • close the menu.
  • Menus are always locked GUIs: players can never move, take, or drop items in the menu, and clicks in their own inventory while a menu is open below it are also cancelled — there is no "show player inventory" mode.
  • Full PlaceholderAPI support (if installed) in titles, item names, lore and messages — e.g. %player_name%, %plainbase_vanished%.

Commands

Command Description Permission
/menu new <name> Create a new, empty menu template. plainbase.menu.new
/menu delete <name> Delete a menu. plainbase.menu.delete
/menu open <name> Open a menu for yourself. plainbase.menu.open
/menu list List all configured menus. plainbase.menu.list
(all Menu commands) Grants every permission of this module. plainbase.menu.admin

Configuration (modules/menu.yml)

menu:
  enabled: true
  commands:
    menu:
      enabled: true

menus:
  example:
    title: "<yellow>Example Menu"
    size: 27 # 9, 18, 27, 36, 45 or 54
    fill-material: GRAY_STAINED_GLASS_PANE # optional
    items:
      '11':
        material: RED_BED
        name: "<red><bold>Spawn"
        lore:
          - "<gray>Teleports you to the"
          - "<gray>spawn location."
        sound: "BLOCK_NOTE_BLOCK_PLING" # optional
        message: "<green>You have been teleported to spawn!" # optional, shown to the clicker
        close: true # optional, close menu after click
        commands:
          - "spawn"
  • Menu keys (example) are the identifier used with /menu open <name>, /menu delete <name>, etc. — pick descriptive kebab-case names.
  • items keys are slot indices as strings (note the quotes: '11'), 0-indexed from top-left, left to right, top to bottom.
  • sound accepts any Bukkit Sound enum name.
  • You can add as many menus as you like under menus:.

Clone this wiki locally