Class ListMask
java.lang.Object
io.github.projectunified.craftux.mask.MultiMask<Mask>
io.github.projectunified.craftux.mask.ListMask
The mask with a list of child masks
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map<Position, Consumer<ActionItem>> Get a map of positions to action item consumersbooleanShould the mask keep the current index for the unique id?voidremoveCurrentIndex(UUID uuid) Remove the current index for the unique idvoidsetKeepCurrentIndex(boolean keepCurrentIndex) Should the mask keep the current index for the unique id?voidstop()Stop the element.Methods inherited from class io.github.projectunified.craftux.mask.MultiMask
add, add, getElements, initMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.craftux.common.Mask
getActionMap
-
Constructor Details
-
ListMask
public ListMask()
-
-
Method Details
-
isKeepCurrentIndex
public boolean isKeepCurrentIndex()Should the mask keep the current index for the unique id?- Returns:
- true if it should
-
setKeepCurrentIndex
public void setKeepCurrentIndex(boolean keepCurrentIndex) Should the mask 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:MaskGet a map of positions to action item consumers- Parameters:
uuid- the uuid of the player- Returns:
- the map, or null if no items should be displayed. Can return null in a conditional case (e.g. predicate mask)
-
stop
public void stop()Description copied from interface:ElementStop the element. Should be called after removing from the GUI.
-