java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.ListButton
All Implemented Interfaces:
Button, me.hsgamer.hscore.ui.property.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 getItem(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 getItem(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
    • getItem

      public Item getItem(@NotNull @NotNull UUID uuid)
      Specified by:
      getItem in interface Button
    • handleAction

      public void handleAction(ClickEvent event)
      Specified by:
      handleAction in interface Button
    • forceSetAction

      public boolean forceSetAction(@NotNull @NotNull UUID uuid)
      Specified by:
      forceSetAction in interface Button
    • init

      public void init()
      Specified by:
      init in interface me.hsgamer.hscore.ui.property.Initializable
    • stop

      public void stop()
      Specified by:
      stop in interface me.hsgamer.hscore.ui.property.Initializable