New pagination / button + PacketManager API access#234
Open
1robie wants to merge 10 commits intoMaxlego08:developfrom
Open
New pagination / button + PacketManager API access#2341robie wants to merge 10 commits intoMaxlego08:developfrom
1robie wants to merge 10 commits intoMaxlego08:developfrom
Conversation
…nd related button classes to allow a single button to paginate
…fix issue with back/inv action on close actions
…ventory navigation
… resets (for buttons paginations)
…clickable buttons
…ing in packet events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 a robust pagination system for inventory GUIs and refines several API interfaces to improve extensibility and usability. The main focus is on adding a
PaginationManagerAPI and related button abstractions to support paginated inventory content, along with some configuration and API enhancements.Pagination system and inventory API enhancements:
PaginationManagerAPI (PaginationManager.java) for managing paginated inventory states per player and context, including methods for page navigation, state management, and max page tracking.GenericPaginateButtonprovides page navigation and state helpers for paginated buttons.GenericPaginationButton<T>extendsGenericPaginateButtonto render paginated elements in inventory slots, handling element slicing and placeholder registration for current/max page.PaginationManagervia theInventoryManagerinterface, allowing plugins to access and use the pagination system for inventory GUIs. [1] [2]API and configuration improvements:
PacketManagerAPI (PacketManager.java) for inventory title editing and lifecycle hooks, and exposed it as an optional method in theMenuPlugininterface. [1] [2] [3]skipCloseActionsOnInventorySwitchtoConfiguration.java, allowing certain inventory switches to skip close actions, with corresponding load/save logic and config path. [1] [2] [3] [4]Item stack component refinement:
CustomModelDataComponentto use non-optional lists for its fields, simplifying its API and usage, and updated the application logic accordingly. [1] [2]