Class Menu
java.lang.Object
com.github.pinont.singularitylib.api.ui.Menu
- Direct Known Subclasses:
PaginatedMenu
Class for creating and managing custom inventory menus.
Provides functionality to create interactive GUIs with buttons and layouts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a button to this menu.protected voidClears all buttons (used by subclasses that re-render per page).Gets the list of buttons in this menu.Gets the layout pattern of this menu.protected org.bukkit.plugin.PluginGets the owning plugin.intgetSize()Gets the size of this menu.getTitle()Gets the title of this menu.Sets the layout keys that map characters to buttons.Sets the layout pattern for this menu using string patterns.voidshow(org.bukkit.entity.Player player) Shows this menu to the specified player.
-
Constructor Details
-
Menu
Creates a new Menu with the specified title and automatic size.- Parameters:
title- the title of the menu
-
Menu
Creates a new Menu with the specified title and size.- Parameters:
title- the title of the menusize- the size of the menu inventory
-
-
Method Details
-
getButtons
-
clearButtons
protected void clearButtons()Clears all buttons (used by subclasses that re-render per page). -
getPlugin
protected org.bukkit.plugin.Plugin getPlugin()Gets the owning plugin.- Returns:
- the plugin that owns this menu
-
getTitle
-
getSize
public int getSize()Gets the size of this menu.- Returns:
- the menu size
-
setLayout
-
getLayout
-
setKey
-
addButton
-
show
public void show(org.bukkit.entity.Player player) Shows this menu to the specified player.- Parameters:
player- the player to show the menu to
-