Class ButtonPaginatedMask
java.lang.Object
io.github.projectunified.craftux.mask.PaginatedMask
io.github.projectunified.craftux.mask.ButtonPaginatedMask
The button paginated mask, those with a long list of buttons divided into pages.
-
Field Summary
Fields inherited from class io.github.projectunified.craftux.mask.PaginatedMask
cycle, pageNumberMap
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ButtonPaginatedMask
(@NotNull Function<UUID, List<Position>> maskPositionFunction) Create a new mask -
Method Summary
Modifier and TypeMethodDescriptiongetButtons
(@NotNull UUID uuid) Get the buttons for the unique idprotected @Nullable Map
<Position, Consumer<ActionItem>> getItemMap
(@NotNull UUID uuid, int pageNumber) Generate the item map for the unique idGet the mask position functionvoid
stop()
Stop the element.Methods inherited from class io.github.projectunified.craftux.mask.PaginatedMask
apply, getAndSetExactPage, getExactPage, getPage, isCycle, nextPage, previousPage, setCycle, setPage
-
Constructor Details
-
ButtonPaginatedMask
Create a new mask- Parameters:
maskPositionFunction
- the mask position function
-
-
Method Details
-
getMaskPositionFunction
Get the mask position function- Returns:
- the mask position function
-
getButtons
Get the buttons for the unique id- Parameters:
uuid
- the unique id- Returns:
- the buttons
-
getItemMap
@Nullable protected @Nullable Map<Position,Consumer<ActionItem>> getItemMap(@NotNull @NotNull UUID uuid, int pageNumber) Description copied from class:PaginatedMask
Generate the item map for the unique id- Specified by:
getItemMap
in classPaginatedMask
- Parameters:
uuid
- the unique idpageNumber
- the page number- Returns:
- the map contains the positions and the buttons
-
stop
public void stop()Description copied from interface:Element
Stop the element. Should be called after removing from the GUI.
-