Class ListButton
java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.ListButton
- All Implemented Interfaces:
Button,me.hsgamer.hscore.ui.property.Initializable
The button with a list of child buttons
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Button>
ListButtonaddButton(@NotNull Collection<@NotNull T> buttons) Add button(s)Add button(s)booleanforceSetAction(@NotNull UUID uuid) Get the list of buttonsvoidhandleAction(ClickEvent event) voidinit()booleanShould the button keep the current index for the unique id on everygetItem(UUID)times?voidremoveCurrentIndex(UUID uuid) Remove the current index for the unique idsetKeepCurrentIndex(boolean keepCurrentIndex) Should the button keep the current index for the unique id on everygetItem(UUID)times?voidstop()
-
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
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 everygetItem(UUID)times?- Returns:
- true if it should
-
setKeepCurrentIndex
Should the button keep the current index for the unique id on everygetItem(UUID)times?- Parameters:
keepCurrentIndex- true if it should- Returns:
- this instance
-
removeCurrentIndex
Remove the current index for the unique id- Parameters:
uuid- the unique id
-
getButtons
Get the list of buttons- Returns:
- the buttons
-
getItem
-
handleAction
- Specified by:
handleActionin interfaceButton
-
forceSetAction
- Specified by:
forceSetActionin interfaceButton
-
init
public void init()- Specified by:
initin interfaceme.hsgamer.hscore.ui.property.Initializable
-
stop
public void stop()- Specified by:
stopin interfaceme.hsgamer.hscore.ui.property.Initializable
-