java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.ListButton
All Implemented Interfaces:
Button, Initializable

public class ListButton extends Object implements Button
The button with a list of child buttons
  • Constructor Details

    • ListButton

      public ListButton()
  • Method Details

    • addButton

      @Contract("_ -> this") public <T extends Button> ListButton addButton(@NotNull @NotNull Collection<@NotNull T> buttons)
      Add button(s)
      Type Parameters:
      T - the type of the button
      Parameters:
      buttons - the buttons
      Returns:
      this instance
    • addButton

      @Contract("_ -> this") public ListButton addButton(@NotNull @NotNull Button... button)
      Add button(s)
      Parameters:
      button - the button
      Returns:
      this instance
    • isKeepCurrentIndex

      public boolean isKeepCurrentIndex()
      Should the button keep the current index for the unique id on every display(UUID) times?
      Returns:
      true if it should
    • setKeepCurrentIndex

      @Contract("_ -> this") public ListButton setKeepCurrentIndex(boolean keepCurrentIndex)
      Should the button keep the current index for the unique id on every display(UUID) times?
      Parameters:
      keepCurrentIndex - true if it should
      Returns:
      this instance
    • removeCurrentIndex

      public void removeCurrentIndex(UUID uuid)
      Remove the current index for the unique id
      Parameters:
      uuid - the unique id
    • getButtons

      public List<Button> getButtons()
      Get the list of buttons
      Returns:
      the buttons
    • init

      public void init()
      Description copied from interface: Initializable
      Initialize some properties for the object
      Specified by:
      init in interface Initializable
    • stop

      public void stop()
      Description copied from interface: Initializable
      Stop the object
      Specified by:
      stop in interface Initializable
    • display

      public DisplayButton display(@NotNull @NotNull UUID uuid)
      Description copied from interface: Button
      Display the button
      Specified by:
      display in interface Button
      Parameters:
      uuid - the unique id
      Returns:
      the display button