Submenus
Secondary screens (shops, warp menus, settings panels) are created inside the plugins/EasyMenu/sub/ directory.
File Organization
A submenu's file name (excluding the .yml extension) serves as its Menu ID:
plugins/EasyMenu/
├── main.yml # Main menu (ID: main)
└── sub/
├── shop.yml # Submenu (ID: shop)
├── warp.yml # Submenu (ID: warp)
└── admin/
└── panel.yml # Nested submenu (ID: admin/panel or admin_panel)
:::tip Search Depth
Nested subdirectories are searched up to submenu.search-depth levels (default: 3) configured in config.yml.
:::
Cross-Menu Navigation
You can link menus together in two ways:
Method 1: Shorthand (sub_<ID> / main_mainopen)
The simplest way using the command property:
menu-items:
# Opens sub/shop.yml
- slot: 11
material: EMERALD
name: "&aOpen Shop"
command: "sub_shop"
close-menu: true
# Opens sub/warp.yml
- slot: 15
material: COMPASS
name: "&bWarp List"
command: "sub_warp"
close-menu: true
To return to the main menu from any submenu:
menu-items:
# Return to main menu
- slot: 22
material: BARRIER
name: "&cBack to Main Menu"
command: "main_mainopen"
close-menu: true
Method 2: Typed Action (type: open-menu)
Best for multi-action sequences and explicit definitions:
menu-items:
- slot: 13
material: EMERALD
name: "&aGo to Shop"
actions:
- type: sound
sound: "UI_BUTTON_CLICK"
- type: open-menu
menu: "shop"
- type: message
message: "&aOpened the shop menu."
:::info Guaranteed Sequential Order
In EasyMenu 7, open-menu waits until the target menu is fully rendered on the client before proceeding to the next action. This guarantees that subsequent messages and sounds align perfectly with the newly displayed screen.
:::
Typos Caught at Reload
If a menu contains an open-menu action targeting a non-existent menu ID (e.g. open-menu: missing_menu), /menu reload rejects the candidate immediately. This prevents players from encountering broken transitions during gameplay.