Class ListButton

java.lang.Object
io.github.projectunified.craftux.button.MultiButton
io.github.projectunified.craftux.button.ListButton
All Implemented Interfaces:
Button, Element

public class ListButton extends MultiButton
The button that loops through the list of child buttons
  • Constructor Details

    • ListButton

      public ListButton()
  • Method Details

    • isKeepCurrentIndex

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

      public void setKeepCurrentIndex(boolean keepCurrentIndex)
      Should the button keep the current index for the unique id?
      Parameters:
      keepCurrentIndex - true if it should
    • removeCurrentIndex

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

      public boolean apply(@NotNull @NotNull UUID uuid, @NotNull @NotNull ActionItem actionItem)
      Description copied from interface: Button
      Apply actions to the action item
      Parameters:
      uuid - the uuid of the player
      actionItem - the action item
      Returns:
      true if any action was applied. Can return false in a conditional case (e.g. predicate button)