Package net.staticstudios.menus.menu
Class TemplatedMenuBuilder
java.lang.Object
net.staticstudios.menus.menu.TemplatedMenuBuilder
- All Implemented Interfaces:
Cloneable,MenuBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(MenuViewer viewer) Build the menuAdd a button mapping.clone()defaultPlaceholder(Button defaultPlaceholder) Set the default placeholder button.Set the ID of the menu.onClose(MenuAction action) Add an action to run when the menu is closed.onOpen(MenuAction action) Add an action to run when the menu is opened.options(Function<MenuOptions, MenuOptions> optionsEditor) Set the options for the menu.Set the title of the menu.title(net.kyori.adventure.text.Component title) Set the title of the menu.
-
Constructor Details
-
TemplatedMenuBuilder
-
-
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
-
clone
-