Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
ClearInvTypeenum inClearInvType.javato 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))BaseInventoryandInventoryinterfaces to support getting and settingClearInvType, 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))ItemButtonto track whether it is in the player inventory and reference its parentBaseInventory, 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:
Configuration.javafor 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:
isPaperOrFolia()toMenuPluginto 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))TriConsumerfunctional 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))InventoriesPlayernow supports temporary inventory storage, andInventoryPlayercan 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:
ComponentsManagerandActionHelperto 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))YamlParserto 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.