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 TypeMethodDescriptionboolean
apply
(@NotNull UUID uuid, @NotNull ActionItem actionItem) Apply actions to the action itemboolean
Should the button keep the current index for the unique id?void
removeCurrentIndex
(UUID uuid) Remove the current index for the unique idvoid
setKeepCurrentIndex
(boolean keepCurrentIndex) Should the button keep the current index for the unique id?Methods inherited from class io.github.projectunified.craftux.button.MultiButton
addButton, addButton, getButtons, init, requireChildButtons, stop
-
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:Button
Apply 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)
-