Skip to content

Add inventory sub menus#282

Draft
SalyyS1 wants to merge 2 commits into
HelpChat:mainfrom
SalyyS1:inventory-sub-menus
Draft

Add inventory sub menus#282
SalyyS1 wants to merge 2 commits into
HelpChat:mainfrom
SalyyS1:inventory-sub-menus

Conversation

@SalyyS1
Copy link
Copy Markdown

@SalyyS1 SalyyS1 commented May 15, 2026

Summary

This PR adds a separate sub-menu system for rendering DeluxeMenus content into the player's lower inventory area, while keeping normal GUI menus under gui_menus.

CommandPanels conversion has been removed from this PR as out of scope. MiniMessage menu text support is also not included here and will be tracked under the Paper-only draft PR (#228).

Inventory sub menus

Sub menus are loaded separately from normal GUI menus:

gui_menus:
  ascension:
    file: commandpanels/ascension.yml
  dungeon:
    file: commandpanels/dungeon.yml

sub_menus:
  test:
    file: test.yml

Sub menu files live in:

plugins/DeluxeMenus/sub_menu

Sub menus are capped to the lower inventory surface: slots 0-35. They are not listed as normal GUI menus and do not register open commands.

A normal GUI can attach a default lower panel with:

player_inventory_menu: bottom_toolbar

bottom_menu is also supported as an alias.

Dynamic lower panel action

This PR adds:

right_click_commands:
  - "[open_gui_inventory] tengui"

The action opens the named sub_menus entry into the lower 36 inventory slots of the currently open menu. If the current GUI did not enable hide_player_inventory, DeluxeMenus snapshots and hides the player's inventory before rendering the sub menu, then restores it on close, quit, reload, shutdown, or death.

Sub menus can also use existing GUI actions:

click_commands:
  - "[openguimenu] dungeon"

When a sub menu opens a normal GUI menu, the lower sub menu is preserved if the new GUI does not define its own player_inventory_menu. If the new GUI does define one, that configured sub menu replaces the current lower panel to avoid duplicate or conflicting inventory overlays.

Sub menus can also open other sub menus with [open_gui_inventory] <sub-menu>.

Validation

  • Ran ./gradlew.bat build successfully.

@Kqliber
Copy link
Copy Markdown
Member

Kqliber commented May 15, 2026

Hi, thanks for the PR

Please could the CommandPanels converter be removed, as this is out of scope of the plugin.
MiniMessage support will also be tracked under the Paper only draft PR (#228), as spigot doesn't have full Component support within menus. please remove this also.

Once this is done we will review the code. Thank you!

@SalyyS1 SalyyS1 changed the title Add inventory sub menus and CommandPanels converter Add inventory sub menus May 15, 2026
@SalyyS1
Copy link
Copy Markdown
Author

SalyyS1 commented May 15, 2026

Hi, thanks for the PR

Please could the CommandPanels converter be removed, as this is out of scope of the plugin. MiniMessage support will also be tracked under the Paper only draft PR (#228), as spigot doesn't have full Component support within menus. please remove this also.

Once this is done we will review the code. Thank you!

Thanks for your reply! I've deleted the commandpanel convert and modified a few things. Thanks again, I really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants