Package net.staticstudios.menus.menu
Interface Menu
- All Superinterfaces:
org.bukkit.inventory.InventoryHolder
- All Known Implementing Classes:
PagedMenu,SimpleMenu,TemplatedMenu
public interface Menu
extends org.bukkit.inventory.InventoryHolder
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MenuBuilderSelectorbuilder()Get a selectordefault voidclose()Close the menu@NotNull ButtongetButton(int slot) Get the button at the given slotgetId()Get the ID of the menuGet the options of the menu@NotNull MenuViewerGet the viewer of the menudefault voidopen()Open the menuvoidopen(boolean clearHistory, boolean pushToHistory) Open the menuvoidrunActions(@NotNull Menu.Action action, @NotNull MenuViewer viewer) Run the actions associated with the given action (type)voidSet the button at the given slotdefault voidupdateButton(int slot, Function<@NotNull Button, @NotNull Button> updater) Update the button at the given slotMethods inherited from interface org.bukkit.inventory.InventoryHolder
getInventory
-
Method Details
-
builder
Get a selector- Returns:
- a builder selector
-
getButton
Get the button at the given slot- Parameters:
slot- the slot to get the button from- Returns:
- the button at the given slot
-
updateButton
Update the button at the given slot- Parameters:
slot- the slot to update the button atupdater- the function to update the button
-
open
default void open()Open the menu -
close
default void close()Close the menu -
open
void open(boolean clearHistory, boolean pushToHistory) Open the menu- Parameters:
clearHistory- whether to clear the historypushToHistory- whether to push the menu to the history
-
getViewer
Get the viewer of the menu- Returns:
- the viewer of the menu
-
getId
String getId()Get the ID of the menu- Returns:
- the ID of the menu
-
getOptions
MenuOptions getOptions()Get the options of the menu- Returns:
- the options of the menu
-