Class ListButton
java.lang.Object
io.github.projectunified.craftux.button.MultiButton
io.github.projectunified.craftux.button.ListButton
The button that loops through the list of child buttons
-
Field Summary
Fields inherited from class io.github.projectunified.craftux.button.MultiButton
buttons -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(@NotNull UUID uuid, @NotNull ActionItem actionItem) Apply actions to the action itembooleanShould the button keep the current index for the unique id?voidremoveCurrentIndex(UUID uuid) Remove the current index for the unique idvoidsetKeepCurrentIndex(boolean keepCurrentIndex) Should the button keep the current index for the unique id?voidstop()Stop the element.Methods inherited from class io.github.projectunified.craftux.button.MultiButton
addButton, addButton, getButtons, init
-
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
Remove the current index for the unique id- Parameters:
uuid- the unique id
-
apply
Description copied from interface:ButtonApply actions to the action item- Parameters:
uuid- the uuid of the playeractionItem- the action item- Returns:
- true if any action was applied. Can return false in a conditional case (e.g. predicate button)
-
stop
public void stop()Description copied from interface:ElementStop the element. Should be called after removing from the GUI.- Specified by:
stopin interfaceElement- Overrides:
stopin classMultiButton
-