Interface InventoryButton

All Superinterfaces:
Button, PerformButton, PermissibleButton, PlaceholderButton, SlotButton

public interface InventoryButton extends Button
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 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

      List<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 String arguments 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 int indicating which page of the inventory should be shown.