Skip to content

Conversation

@1robie
Copy link
Collaborator

@1robie 1robie commented Jan 31, 2026

This pull request introduces several new features and improvements primarily focused on inventory management, configuration options, and codebase organization. The most significant changes include the addition of a configurable inventory clearing system, enhancements to inventory-related APIs, new configuration options for click event limiting, and various codebase refactors for maintainability.

Inventory Management Enhancements:

  • Introduced the ClearInvType enum in ClearInvType.java to provide configurable strategies for clearing player inventories, with support for plugin-based extensions and custom behaviors. ([API/src/main/java/fr/maxlego08/menu/api/utils/ClearInvType.javaR1-R73](https://github.com/Maxlego08/zMenu/pull/218/files#diff-608aed564e086dcf44a87fa95a513f6eb13c23370e540a2c18a50739e8fd1cbfR1-R73))
  • Updated BaseInventory and Inventory interfaces to support getting and setting ClearInvType, enabling inventories to specify their clear behavior. ([[1]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-073bf8561afd73c316b37dbd67be4d8ac54cbde27fdd9858966cd8e0a9de62ddR97-R99), [[2]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-a634475b3944703314b06aeeb2e8b95d82e5c0d387d225983598f545d6e07170R230-R231), [[3]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-073bf8561afd73c316b37dbd67be4d8ac54cbde27fdd9858966cd8e0a9de62ddR6), [[4]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-a634475b3944703314b06aeeb2e8b95d82e5c0d387d225983598f545d6e07170R11))
  • Extended ItemButton to track whether it is in the player inventory and reference its parent BaseInventory, supporting more contextual button handling. ([[1]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-9bb88f4bd72545b05cd9a35249a5233698cbdc8afc53a2696c434fa76a8e39bbR18-R26), [[2]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-9bb88f4bd72545b05cd9a35249a5233698cbdc8afc53a2696c434fa76a8e39bbR90-R100))

Configuration Additions:

  • Added new configuration options to Configuration.java for enabling a packet event click limiter (enablePacketEventClickLimiter) and configuring its timing (packetEventClickLimiterMilliseconds). These options are loaded and saved as part of the configuration lifecycle. ([[1]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-9a9449436824297bb658ef3c22a6d3a85ef10e7835de43649133ca8d2cc4935bR285-R302), [[2]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-9a9449436824297bb658ef3c22a6d3a85ef10e7835de43649133ca8d2cc4935bR399-R401), [[3]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-9a9449436824297bb658ef3c22a6d3a85ef10e7835de43649133ca8d2cc4935bR450-R451), [[4]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-9a9449436824297bb658ef3c22a6d3a85ef10e7835de43649133ca8d2cc4935bL478-R504))

API and Interface Improvements:

  • Added isPaperOrFolia() to MenuPlugin to check for broader platform compatibility. ([API/src/main/java/fr/maxlego08/menu/api/MenuPlugin.javaR211-R216](https://github.com/Maxlego08/zMenu/pull/218/files#diff-efe0022281051b20a82cd3e2777bc2840db2dfdaa68cbbd05693c10fb1438da1R211-R216))
  • Introduced the TriConsumer functional interface to enable lambdas with three arguments, supporting new inventory-clearing behaviors. ([API/src/main/java/fr/maxlego08/menu/api/interfaces/TriConsumer.javaR1-R6](https://github.com/Maxlego08/zMenu/pull/218/files#diff-6bb4d6077fc2dc1741b60985308675e0d04bd03afabef7fa9993ccfe32e7a6d1R1-R6))
  • Enhanced inventory player APIs: InventoriesPlayer now supports temporary inventory storage, and InventoryPlayer can be queried for permanence. ([[1]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-23f45b4edae477355c0493f4b67abb3ac58724e45ff6458c13de2a627301e2dfR25-R30), [[2]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-a24e7bf86a0ada1730201bc2057ea0bfd97f7df608fa0092de9a3ab68e2c4086R45-R46), [[3]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-23f45b4edae477355c0493f4b67abb3ac58724e45ff6458c13de2a627301e2dfR7))

Codebase Organization and Refactoring:

  • Moved and renamed ComponentsManager and ActionHelper to new package locations for better modularity and clarity. ([[1]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-1e47ba205c3c4a48f0be247c9c14213718ad796ac17142a095c689448c4e3fccL1-L3), [[2]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-776cb07bf91487fc01628de8a1bbb6636a2d52a25d6701058c0cf3218fe927c9L1-R1))
  • Refactored YAML parsing logic in YamlParser to improve placeholder handling, reduce object creation, and support more flexible data structures. ([[1]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-f93a147728b76b0c84208f7af5d6770559a02508feda85c680a1058b8ea29d0fR17-R18), [[2]](https://github.com/Maxlego08/zMenu/pull/218/files#diff-f93a147728b76b0c84208f7af5d6770559a02508feda85c680a1058b8ea29d0fL64-R132))

These changes collectively improve the flexibility, configurability, and maintainability of the inventory and configuration systems in the project.

@Maxlego08 Maxlego08 merged commit b091782 into Maxlego08:develop Jan 31, 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