Skip to content

Features

Menus

Built-in inventory menus for players and staff, and custom menus written in menus.yml with actions, permissions and placeholders.

The menus module provides the built-in menus and custom menus. Layouts, icons, sounds and custom menus are in menus.yml; texts are in lang/menus/<language>.yml.

Built-in menus

Shop, reports, preferences, ignore list, name color, profile, player panel, sanction history, report queue, player ranks, rank editor, VIP templates, boss bars, network announcements, moderation settings, staff list and player list. See Menu commands.

Menus never skip a rule: each action uses the same service as its command (hierarchy, permissions, validation, audit). Irreversible actions ask for confirmation.

Custom menus

menus.ymlYAML
custom:
  server:
    title: "&8Server menu"
    rows: 3
    permission: ""            # empty = everyone; default sofycore.menus.open.<id>
    items:
      spawn:
        slot: 11
        material: "COMPASS"
        name: "&aSpawn"
        lore: ["&7Go to spawn"]
        actions: ["[player] spawn", "[close]"]
      shop:
        slot: 15
        material: "GOLD_INGOT"
        glow: true
        actions: ["[open] vip-shop"]

Open it with /menu server.

Actions

ActionEffect
[player] <command>Runs a command as the player
[console] <command>Runs a command as the console ({player} is the validated player name)
[message] <text>Sends a message
[sound] <key>Plays a configured sound
[open] <menu>Opens a custom or built-in menu
[close]Closes the menu

right-actions is used on right click (otherwise actions). Other item fields: slots: "0-8,18-26", amount, model, own-head and a per-item permission.

Materials across versions

Materials accept several names separated by |; the first one that exists wins. "LIME_WOOL|WOOL:5" works on 1.8 and on 26.x.

Protection and performance

  • Menu items cannot be taken, moved, dragged, dropped or swapped; leftovers are removed when the menu closes.
  • Every lookup is asynchronous: the menu opens instantly with "Loading" and fills in place.
  • Player heads show the default skin first and update when the real skin arrives.
  • An action that changes data locks the menu until it finishes, so a double click never runs it twice.