Interface Button

All Known Implementing Classes:
BackButton, EmptyButton, MutableButton, NextPageButton, PreviousPageButton, SimpleButton

public interface Button
  • Field Details

    • BACK

      static final Button BACK
    • NEXT_PAGE

      static final Button NEXT_PAGE
    • PREVIOUS_PAGE

      static final Button PREVIOUS_PAGE
    • EMPTY

      static final Button EMPTY
  • Method Details

    • builder

      static ButtonBuilderSelector builder()
      Get a builder selector
      Returns:
      the builder selector
    • fromItemStack

      static MutableButton fromItemStack(org.bukkit.inventory.ItemStack itemStack)
      Create a MutableButton from an ItemStack
      Parameters:
      itemStack - the item stack to use
      Returns:
      the created button
    • getItemRepresentation

      @Nullable org.bukkit.inventory.ItemStack getItemRepresentation(MenuViewer viewer, Menu menu)
      Get the item representation of the button. This is the item that will be displayed in the menu.
      Parameters:
      viewer - the viewer
      menu - the menu
      Returns:
      the item stack
    • invokeActions

      void invokeActions(@NotNull @NotNull Button.Action action, @NotNull @NotNull Menu menu, @NotNull @NotNull MenuViewer viewer)
      Invoke the actions of the button
      Parameters:
      action - the action (type)
      menu - the menu
      viewer - the viewer