Skip to content

Conversation

@1robie
Copy link
Collaborator

@1robie 1robie commented Jan 20, 2026

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

  • Added extensive use of @NotNull and @Nullable annotations to methods and parameters in interfaces such as ButtonManager, 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

  • Added new context-based build method ItemStack build(BuildContext context) to MenuItemStack, and made MenuItemStack extend MenuItemStackContext, supporting more flexible item stack construction.
  • Removed redundant getter methods from MenuItemStack to streamline its interface and focus on context-driven operations.

New Managers and Extension Points

  • Introduced the ComponentsManager interface for managing item component loaders, including registration, retrieval, and initialization of default components.
  • Added new methods to ItemManager for retrieving mechanic factories by ID, enhancing extensibility for custom item mechanics.

Feature Additions

  • Added support for title animations in inventories via new methods in the Inventory interface (setTitleAnimation, getTitleAnimation).
  • Extended InventoryManager with a new method for skull item stack post-processing that accepts a Placeholders object, allowing for more dynamic item customization.

Dependency Updates

  • Added net.kyori:adventure-api:4.25.0 as a new dependency in the build script, likely to support advanced text and UI features.

1robie added 30 commits January 13, 2026 23:07
…rsing and handle optional trail/twinkle properties
1robie added 23 commits January 18, 2026 20:11
…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
@1robie 1robie requested a review from Copilot January 20, 2026 17:30
Copy link
Contributor

Copilot AI left a 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.utils to common.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.


// Update buttons who need to be updated
this.updatedButtons.forEach(this::buildButton);
this.updatedButtons.forEach(updatedButton->this.buildButton(button,placeholders));
Copy link

Copilot AI Jan 20, 2026

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.

Suggested change
this.updatedButtons.forEach(updatedButton->this.buildButton(button,placeholders));
this.updatedButtons.forEach(updatedButton -> this.buildButton(updatedButton, placeholders));

Copilot uses AI. Check for mistakes.
V_1_21_8(1218),
V_1_21_9(1219),
V_1_21_10(1210)
V_1_21_10(12110),
Copy link

Copilot AI Jan 20, 2026

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.

Copilot uses AI. Check for mistakes.
@Maxlego08 Maxlego08 merged commit 809e39f into Maxlego08:develop Jan 20, 2026
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