Skip to content

New pagination / button + PacketManager API access#234

Open
1robie wants to merge 10 commits intoMaxlego08:developfrom
1robie:developement
Open

New pagination / button + PacketManager API access#234
1robie wants to merge 10 commits intoMaxlego08:developfrom
1robie:developement

Conversation

@1robie
Copy link
Copy Markdown
Collaborator

@1robie 1robie commented Apr 4, 2026

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 PaginationManager API and related button abstractions to support paginated inventory content, along with some configuration and API enhancements.

Pagination system and inventory API enhancements:

  • Added a new PaginationManager API (PaginationManager.java) for managing paginated inventory states per player and context, including methods for page navigation, state management, and max page tracking.
  • Introduced abstract button classes for paginated GUIs:
    • GenericPaginateButton provides page navigation and state helpers for paginated buttons.
    • GenericPaginationButton<T> extends GenericPaginateButton to render paginated elements in inventory slots, handling element slicing and placeholder registration for current/max page.
  • Exposed the PaginationManager via the InventoryManager interface, allowing plugins to access and use the pagination system for inventory GUIs. [1] [2]

API and configuration improvements:

  • Added a PacketManager API (PacketManager.java) for inventory title editing and lifecycle hooks, and exposed it as an optional method in the MenuPlugin interface. [1] [2] [3]
  • Added a new configuration option skipCloseActionsOnInventorySwitch to Configuration.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:

  • Refactored CustomModelDataComponent to use non-optional lists for its fields, simplifying its API and usage, and updated the application logic accordingly. [1] [2]

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.

1 participant