Skip to main content

Opening Menus

Players can open menus through built-in commands, dedicated dynamic open commands, or navigation from other menus.


Built-in Commands​

EasyMenu provides default commands out of the box.

Open Main Menu​

/menu

Opens plugins/EasyMenu/main.yml. Available to all players by default.

Open a Submenu Directly​

/submenu <menu_id>
# Or short alias
/sm <menu_id>

For example, to open plugins/EasyMenu/sub/shop.yml, run /submenu shop.


Dynamic Open Commands (open-command)​

You can register custom server commands (such as /shop or /warp) directly in any menu file:

plugins/EasyMenu/sub/shop.yml
menu-title: "&a&lServer Shop"
menu-size: 27

# Register a dedicated open command
open-command:
name: "shop"
aliases:
- "store"
- "market"
permission: "myserver.command.shop"
permission-default: true

menu-items:
- slot: 13
material: EMERALD
name: "&aPurchase"
command: "shop buy"

open-command Settings​

KeyTypeDefaultDescription
nameTextRequiredMain command label (without leading slash).
aliasesText List[]List of alternate command labels.
permissionTextNonePermission node required to execute the command.
permission-defaultBooleanfalseDefault permission target. true allows all players; false restricts to operators.

name and every entry of aliases may contain only letters, digits, _ and -, and must be at most 32 characters. A slash, space, or other characters make the menu invalid (invalid-open-command) and the reload is rejected. If the node in permission does not exist yet, EasyMenu registers it using permission-default. When another plugin already defines a node with that name, that definition is left as is. Running an open-command from the console prints a "players only" message.

Command Collision Prevention

If a configured command name is already owned by another plugin or duplicated across multiple menus, /menu reload will detect the collision and reject the reload candidate safely. Existing plugin commands are never overwritten.


Open Conditions (open-when)​

Restrict menu access to players meeting specific conditions:

# Only accessible to VIP players
open-when:
permission: "myserver.vip"

# Message sent when condition fails
open-denied-message: "&cThis menu is exclusive to VIP players."

Whether a player runs /menu, /submenu shop, or /shop, the same open-when condition is enforced universally. See Conditions for full condition syntax.