Skip to content

Minor improvements#230

Merged
Maxlego08 merged 6 commits intoMaxlego08:developfrom
1robie:developement
Mar 15, 2026
Merged

Minor improvements#230
Maxlego08 merged 6 commits intoMaxlego08:developfrom
1robie:developement

Conversation

@1robie
Copy link
Copy Markdown
Collaborator

@1robie 1robie commented Mar 14, 2026

This pull request introduces several improvements and fixes related to permissions, item flag handling, and trim configuration loading in the menu system. The main themes are enhanced permission granularity, improved error handling and logging for trim patterns/materials, and safer flag parsing.

Permission and Command Improvements:

  • Added new permissions (ZMENU_GIVE_OPEN_ITEM, ZMENU_EDITOR, ZMENU_VERSION) and removed the old ZMENU_OPEN_ITEM to provide more granular control over command access. Commands such as CommandMenuEditor, CommandMenuGiveOpenItem, and CommandMenuVersion now require the appropriate new permissions. [1] [2] [3] [4] [5]

Item Flag Handling:

  • Improved flag parsing in MenuItemStackLoader to ignore null flags, preventing potential errors when loading item flags from configuration.
  • Simplified the logic in ZMenuItemStack for applying item flags by removing unnecessary null checks, as nulls are now filtered earlier.

Trim Pattern and Material Loading:

  • Refactored trim loading to use the Registry and NamespacedKey APIs directly, removing the dependency on TrimHelper. This change adds robust error handling and logs available patterns/materials if a lookup fails, improving debuggability and user feedback.
  • Added usage of Java Streams for collecting available trim patterns and materials for error reporting.

Code Cleanup:

  • Removed unused imports and reordered imports for consistency and clarity. [1] [2] [3]

These changes collectively improve the maintainability, usability, and reliability of the menu system, especially regarding permissions and item customization.

@Maxlego08 Maxlego08 merged commit dfd60de into Maxlego08:develop Mar 15, 2026
1 of 2 checks passed
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