Interface InventoryButton
- All Superinterfaces:
Button,PerformButton,PermissibleButton,PlaceholderButton,SlotButton
Represents a button within a user interface in a Minecraft plugin that allows the player
to open a new inventory. This interface extends the basic functionality of a Button
to specifically handle inventory interactions, enabling the creation of complex GUIs
where actions can lead to different inventory screens.
The inventory to be opened by this button is identified by a unique identifier, allowing for dynamic and flexible GUI navigation based on the game's logic or player's actions. Additional parameters such as arguments and page numbers can be used to further customize the behavior or content of the inventory to be opened.
-
Method Summary
Modifier and TypeMethodDescriptionProvides a list of arguments that may be required for opening the inventory.Returns the unique identifier of the inventory to be opened when this button is interacted with.intRetrieves the page number of the inventory to be opened if the inventory supports pagination.Methods inherited from interface fr.maxlego08.menu.api.button.Button
buildDisplayName, buildLore, closeInventory, getActions, getClickRequirements, getCustomItemStack, getData, getItemStack, getMessages, getName, getOpenLink, getOptions, getPlayerHead, getRealSlot, getSlot, getSound, getViewRequirement, hasCustomRender, hasSpecialRender, isClickable, isPermanent, isRefreshOnClick, isUpdated, isUseCache, onBackClick, onClick, onDrag, onInventoryClick, onInventoryClose, onInventoryOpen, onLeftClick, onMiddleClick, onRender, onRightClick, updateOnClickMethods inherited from interface fr.maxlego08.menu.api.button.PerformButton
execute, getCommands, getConsoleCommands, getConsoleLeftCommands, getConsolePermission, getConsolePermissionCommands, getConsoleRightCommandsMethods inherited from interface fr.maxlego08.menu.api.button.PermissibleButton
checkPermission, getElseButton, getMasterParentButton, getOrPermission, getParentButton, getPermissions, hasElseButton, hasPermissionMethods inherited from interface fr.maxlego08.menu.api.button.PlaceholderButton
getPlaceholders, hasPlaceHolderMethods inherited from interface fr.maxlego08.menu.api.button.SlotButton
getSlots
-
Method Details
-
getInventory
String getInventory()Returns the unique identifier of the inventory to be opened when this button is interacted with. This identifier is used to determine which inventory screen is to be displayed to the player, facilitating the linking of multiple GUI screens within the plugin.- Returns:
- The unique identifier of the target inventory as a
String.
-
getArguments
Provides a list of arguments that may be required for opening the inventory. These arguments can include specific details or parameters that modify the inventory's appearance or functionality, allowing for a dynamic and contextual user experience based on the game's state or player's input.- Returns:
- A list of
Stringarguments that are associated with the inventory to be opened.
-
getToPage
int getToPage()Retrieves the page number of the inventory to be opened if the inventory supports pagination. This is useful for inventories that display a large amount of content that is divided across multiple pages, allowing users to navigate through pages of items or options.- Returns:
- The page number as an
intindicating which page of the inventory should be shown.
-