Class PagedMenu

java.lang.Object
net.staticstudios.menus.menu.PagedMenu
All Implemented Interfaces:
Menu, org.bukkit.inventory.InventoryHolder

public class PagedMenu extends Object implements Menu
  • Constructor Details

  • Method Details

    • runActions

      public void runActions(@NotNull @NotNull Menu.Action action, @NotNull @NotNull MenuViewer viewer)
      Description copied from interface: Menu
      Run the actions associated with the given action (type)
      Specified by:
      runActions in interface Menu
      Parameters:
      action - the action (type) to run
      viewer - the viewer that triggered the action
    • setButton

      public void setButton(int slot, @NotNull @NotNull Button button)
      Description copied from interface: Menu
      Set the button at the given slot
      Specified by:
      setButton in interface Menu
      Parameters:
      slot - the slot to set the button at
      button - the button to set
    • addButton

      public void addButton(@NotNull @NotNull Button button)
    • getButton

      @NotNull public @NotNull Button getButton(int slot)
      Description copied from interface: Menu
      Get the button at the given slot
      Specified by:
      getButton in interface Menu
      Parameters:
      slot - the slot to get the button from
      Returns:
      the button at the given slot
    • open

      public void open(boolean clearHistory, boolean pushToHistory)
      Description copied from interface: Menu
      Open the menu
      Specified by:
      open in interface Menu
      Parameters:
      clearHistory - whether to clear the history
      pushToHistory - whether to push the menu to the history
    • getViewer

      @NotNull public @NotNull MenuViewer getViewer()
      Description copied from interface: Menu
      Get the viewer of the menu
      Specified by:
      getViewer in interface Menu
      Returns:
      the viewer of the menu
    • getId

      public String getId()
      Description copied from interface: Menu
      Get the ID of the menu
      Specified by:
      getId in interface Menu
      Returns:
      the ID of the menu
    • getOptions

      public MenuOptions getOptions()
      Description copied from interface: Menu
      Get the options of the menu
      Specified by:
      getOptions in interface Menu
      Returns:
      the options of the menu
    • getPage

      public int getPage()
    • previousPage

      public void previousPage()
    • nextPage

      public void nextPage()
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder