Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Automatic pagination for menus #1

Description

@Manered

Will be automatically handled, and calculated.

There should be the following methods for it:

/* Setting the menu pagination buttons */
MenuBuilder menu = new MenuBuilder("Yet Another Manered Utility", 54)
    .setPaginationButtons(
        48, new ItemBuilder(Material.SPECTRAL_ARROW).setName("Previous Page"),
        50, new ItemBuilder(Material.SPECTRAL_ARROW).setName("Next Page")
    );

/* Opening the menu, starts at page 1 and ends at a auto-calculated last page. */
/* If the page is not defined, the method will open the 1st page */
menu.open(player, 1);
menu.nextPage(player);

menu.previousPage(player);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

suggestionNew feature or request/suggestion

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions