Package net.staticstudios.menus.menu
Class SimpleMenuBuilder
java.lang.Object
net.staticstudios.menus.menu.SimpleMenuBuilder
- All Implemented Interfaces:
Cloneable,MenuBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a button to the menu.build(MenuViewer viewer) Build the menuclone()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 a button at a specific index.size(int size) Set the size of the menu.Set the title of the menu.title(net.kyori.adventure.text.Component title) Set the title of the menu.
-
Constructor Details
-
SimpleMenuBuilder
protected SimpleMenuBuilder(boolean mutable)
-
-
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
-
size
Set the size of the menu.- Parameters:
size- The size- Returns:
- The builder
-
options
Set the options for the menu.- Parameters:
optionsEditor- A function to edit the options- Returns:
- The builder
-
clone
-