Package net.staticstudios.menus.menu
Class PagedMenuBuilder
java.lang.Object
net.staticstudios.menus.menu.PagedMenuBuilder
- All Implemented Interfaces:
Cloneable,MenuBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(MenuViewer viewer) Build the menuAdd a button mapping.Set the buttons for the menu.Set the buttons for the menu.clone()defaultPlaceholder(Button defaultPlaceholder) Set the default placeholder button.Set the ID of the menu.marker(char marker) Sets the marker characterSets the marker and the empty markeronClose(MenuAction action) Add an action to run when the menu is closed.onNextPage(MenuAction action) Add an action to run when the next page is opened.onOpen(MenuAction action) Add an action to run when the menu is opened.onPreviousPage(MenuAction action) Add an action to run when the previous page is opened.options(Function<MenuOptions, MenuOptions> optionsEditor) Set the options for the menu.shrinkToFit(boolean shrinkToFit) Set whether the menu should shrink to fit the buttons.Set the title of the menu.title(net.kyori.adventure.text.Component title) Set the title of the menu.
-
Constructor Details
-
PagedMenuBuilder
-
-
Method Details
-
id
Set the ID of the menu. This is used to track history and for other internal purposes.- Parameters:
id- The ID- Returns:
- The builder
-
title
Set the title of the menu.- Parameters:
title- The title- Returns:
- The builder
-
title
Set the title of the menu.- Parameters:
title- The title- Returns:
- The builder
-
options
Set the options for the menu.- Parameters:
optionsEditor- A function to edit the options- Returns:
- The builder
-
buttons
Set the buttons for the menu.- Parameters:
buttons- The buttons- Returns:
- The builder
-
shrinkToFit
Set whether the menu should shrink to fit the buttons.- Parameters:
shrinkToFit- Whether the menu should shrink to fit the buttons- Returns:
- The builder
-
marker
Sets the marker character- Parameters:
marker- The character to use as a marker- Returns:
- The builder
-
clone
-