-
Notifications
You must be signed in to change notification settings - Fork 30
Components + Title animation #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…1.20.5+ and enhanced loader methods
…item functionality
…r enhanced item customization
…ermission expiration and time units
…for enhanced item functionality
…oaders for enhanced item functionality
…ers for enhanced item functionality
…oaders for enhanced item functionality
…d item functionality
…tem customization
…anced item functionality
…hanced book content functionality
… item variant functionality
…vity and improve dye color parsing
…rsing and handle optional trail/twinkle properties
… case sensitivity
…e item component registrations
…e imports accordingly
…ed YAML configuration handling + local placeholders support (patterns + inventories)
…ble method and introduce MenuItemStackContext interface for improved item stack management
… update load method signatures to use MenuItemStackContext
…o utilize it for improved context management
…sary whitespace and ensuring proper cache usage
…em management logic
…fix container component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a comprehensive component system for ItemStack customization in Minecraft 1.20.5+, adds title animation support, enhances type safety with nullability annotations, and refactors the codebase for better maintainability. The changes include structural improvements through package reorganization, YAML configuration caching, and new API features.
Changes:
- Introduced a new component system for ItemStack customization with 100+ loaders supporting attributes, consumables, variants, and more
- Added title animation support via TitleAnimationManager with PacketEvents integration
- Enhanced API type safety with @NotNull/@nullable annotations across ButtonManager, DialogInventory, and other interfaces
- Refactored package structure moving utilities from
zcore.utilstocommon.utils - Added YAML file caching and placeholder parsing system
Reviewed changes
Copilot reviewed 295 out of 384 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/fr/maxlego08/menu/loader/components/spigot/*.java | New component loaders for Spigot (block state, base color, banner patterns, attribute modifiers, attack range) |
| src/main/java/fr/maxlego08/menu/loader/components/SpigotPotionDurationScaleItemComponentLoader.java | Potion duration scale component loader |
| src/main/java/fr/maxlego08/menu/loader/components/AbstractMenuItemStackListComponentLoaderBase.java | Base class for loading lists of MenuItemStacks in components |
| src/main/java/fr/maxlego08/menu/loader/actions/*.java | New MessageToLoader action and refactored MessageLoader with shared logic |
| src/main/java/fr/maxlego08/menu/loader/actions/LuckPermissionSetLoader.java | Enhanced with expiration and time unit support |
| src/main/java/fr/maxlego08/menu/loader/ZButtonLoader.java | Refactored to use YAML file cache and improved pattern loading |
| src/main/java/fr/maxlego08/menu/loader/PatternLoader.java | Updated imports for reorganized packages |
| src/main/java/fr/maxlego08/menu/loader/MenuItemStackLoader.java | Added component system integration for 1.20.5+ |
| src/main/java/fr/maxlego08/menu/loader/InventoryLoader.java | Added title animation loading support |
| src/main/java/fr/maxlego08/menu/inventory/inventories/InventoryDefault.java | Enhanced button building with placeholder support and title animations |
| src/main/java/fr/maxlego08/menu/inventory/VInventory.java | Added title animation properties and cleanup |
| src/main/java/fr/maxlego08/menu/inventory/VInventoryManager.java | Implements VInvManager interface with enhanced skull processing |
| src/main/java/fr/maxlego08/menu/ZInventoryManager.java | Added MessageToLoader registration and YAML parser integration |
| src/main/java/fr/maxlego08/menu/ZInventory.java | Added title animation support |
| src/main/java/fr/maxlego08/menu/ZComponentsManager.java | New manager for registering and retrieving item component loaders |
| src/main/java/fr/maxlego08/menu/ZTitleAnimationManager.java | New manager for title animation loaders |
| src/main/java/fr/maxlego08/menu/ZMenuPlugin.java | Integrated new managers and PacketEvents support |
| src/main/java/fr/maxlego08/menu/ZItemManager.java | Added skip_item_update flag and mechanic factory retrieval |
| src/main/java/fr/maxlego08/menu/ZButtonManager.java | Enhanced with @NotNull/@nullable annotations for type safety |
| src/main/java/fr/maxlego08/menu/ZCommandManager.java | Updated imports for reorganized packages |
| src/main/java/fr/maxlego08/menu/item/CustomItemData.java | Added skipItemUpdate field |
| src/main/java/fr/maxlego08/menu/button/buttons/ZInventoryButton.java | Updated to pass placeholders in inventory argument processing |
| src/main/java/fr/maxlego08/menu/command/commands/*.java | Updated imports for reorganized Permission enum |
| src/main/java/fr/maxlego08/menu/command/*.java | Updated imports for reorganized packages |
| src/main/java/fr/maxlego08/menu/dupe/NMSDupeManager.java | Updated imports for reorganized packages |
| src/main/java/fr/maxlego08/menu/itemstack/ItemModelSimilar.java | Updated imports for reorganized packages |
| src/main/java/fr/maxlego08/menu/listener/*.java | Updated imports for reorganized packages |
| settings.gradle.kts | Fixed to exclude hidden directories from Hooks inclusion |
| changelog.md | Documented new features and improvements |
| Hooks/*/build.gradle.kts | Changed dependency from projects.api to projects.common |
| Hooks/LuckPerms/src/main/java/fr/maxlego08/menu/hooks/luckperms/LuckpermAction.java | Added expiration and time unit support for permissions |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/loader/components/paper/*.java | New Paper-specific component loaders (custom name, lore, variants, etc.) |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/itemstack/components/paper/*.java | Paper component implementations |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/dialogs/ZDialogManager.java | Added @NotNull annotations for type safety |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/dialogs/ZDialogInventory.java | Added @NotNull annotation |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/ComponentMeta.java | Implemented PaperMetaUpdater with component caching |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/hooks/ApplyPaperAttribute.java | Added @NotNull annotations |
| Hooks/Paper/src/main/java/fr/maxlego08/menu/zcore/utils/ZDecorationEntry.java | New decoration entry record for map decorations |
| Hooks/Paper/build.gradle.kts | Updated Paper API version and common dependency |
| Hooks/PacketEvents/src/main/java/fr/maxlego08/menu/hooks/packetevents/*.java | PacketEvents integration for title animations |
| Common/src/main/java/fr/maxlego08/menu/placeholder/Placeholder.java | Fixed fully qualified class name for DistantPlaceholder |
| Common/src/main/java/fr/maxlego08/menu/loader/components/spigot/SpigotVariantItemComponentLoader.java | New variant component loader supporting all entity variants |
| Common/src/main/java/fr/maxlego08/menu/loader/components/*.java | Abstract base classes for color, effect, and firework component loaders |
| Common/src/main/java/fr/maxlego08/menu/itemstack/components/spigot/SpigotVariantComponent.java | Spigot variant component implementations for spawn eggs |
| Common/src/main/java/fr/maxlego08/menu/common/utils/yaml/YamlParser.java | New YAML parser with placeholder replacement |
| Common/src/main/java/fr/maxlego08/menu/common/utils/nms/*.java | Moved from zcore.utils with enhanced NmsVersion support |
| Common/src/main/java/fr/maxlego08/menu/common/utils/cache/*.java | New YAML file caching system |
| Common/src/main/java/fr/maxlego08/menu/common/utils/*.java | Refactored utilities with PlayerUtil for validation and profile handling |
| Common/src/main/java/fr/maxlego08/menu/common/interfaces/VariantComponent.java | Interface defining variant component factory |
| Common/src/main/java/fr/maxlego08/menu/common/enums/*.java | Moved Permission enum and added ConsumeEffectType |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...in/java/fr/maxlego08/menu/loader/components/spigot/SpigotAttackRangeItemComponentLoader.java
Outdated
Show resolved
Hide resolved
|
|
||
| // Update buttons who need to be updated | ||
| this.updatedButtons.forEach(this::buildButton); | ||
| this.updatedButtons.forEach(updatedButton->this.buildButton(button,placeholders)); |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lambda is using the wrong variable. It should be updatedButton instead of button to build each updated button. This causes the same button to be rebuilt multiple times instead of building each updated button.
| this.updatedButtons.forEach(updatedButton->this.buildButton(button,placeholders)); | |
| this.updatedButtons.forEach(updatedButton -> this.buildButton(updatedButton, placeholders)); |
| V_1_21_8(1218), | ||
| V_1_21_9(1219), | ||
| V_1_21_10(1210) | ||
| V_1_21_10(12110), |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version number 12110 is incorrect for V_1_21_10. Following the pattern from previous versions (e.g., V_1_21_9 is 1219), V_1_21_10 should be 12110 which would represent 1.21.10 as '1' + '21' + '10'. However, this breaks the existing pattern where patch versions are single digits. The version should likely be 1211 (following the pattern) or the versioning scheme needs clarification.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces API improvements and new features across several interfaces, focusing on enhanced type safety, context-aware building, and extensibility. The most significant changes include stricter use of nullability annotations in the API, new context-based methods, and the addition of new managers and dependencies.
API Type Safety and Nullability Improvements
@NotNulland@Nullableannotations to methods and parameters in interfaces such asButtonManager,DialogInventory, and others, ensuring better type safety and clearer contract definitions for implementers and consumers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Context-Aware and Extensible API Methods
ItemStack build(BuildContext context)toMenuItemStack, and madeMenuItemStackextendMenuItemStackContext, supporting more flexible item stack construction.MenuItemStackto streamline its interface and focus on context-driven operations.New Managers and Extension Points
ComponentsManagerinterface for managing item component loaders, including registration, retrieval, and initialization of default components.ItemManagerfor retrieving mechanic factories by ID, enhancing extensibility for custom item mechanics.Feature Additions
Inventoryinterface (setTitleAnimation,getTitleAnimation).InventoryManagerwith a new method for skull item stack post-processing that accepts aPlaceholdersobject, allowing for more dynamic item customization.Dependency Updates
net.kyori:adventure-api:4.25.0as a new dependency in the build script, likely to support advanced text and UI features.