Class PaginatedMask
java.lang.Object
me.hsgamer.hscore.minecraft.gui.mask.BaseMask
me.hsgamer.hscore.minecraft.gui.mask.impl.PaginatedMask
- All Implemented Interfaces:
Mask,me.hsgamer.hscore.ui.property.Initializable
- Direct Known Subclasses:
ButtonPaginatedMask,MaskPaginatedMask,SequencePaginatedMask
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetExactPage(int page, @NotNull UUID uuid) Get the exact page from the input page for the unique idintGet the current page for the unique idabstract intgetPageAmount(@NotNull UUID uuid) Get the amount of pages for the unique idbooleanisCycle()Check if this paginated mask allows cycle page (The first page after the last page)voidSet the next page for the unique idvoidpreviousPage(@NotNull UUID uuid) Set the previous page for the unique idvoidsetCycle(boolean cycle) Set if this paginated mask allows cycle page (The first page after the last page)voidSet the page for the unique idMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.ui.property.Initializable
init, stopMethods inherited from interface me.hsgamer.hscore.minecraft.gui.mask.Mask
canView, generateButtons
-
Field Details
-
pageNumberMap
-
cycle
protected boolean cycle
-
-
Constructor Details
-
PaginatedMask
Create a new mask- Parameters:
name- the name of the mask
-
-
Method Details
-
getPageAmount
Get the amount of pages for the unique id- Parameters:
uuid- the unique id- Returns:
- the amount of pages
-
setPage
Set the page for the unique id- Parameters:
uuid- the unique idpage- the page
-
getExactPage
Get the exact page from the input page for the unique id- Parameters:
page- the input pageuuid- the unique id- Returns:
- the exact page
-
getPage
Get the current page for the unique id- Parameters:
uuid- the unique id- Returns:
- the page number
-
nextPage
Set the next page for the unique id- Parameters:
uuid- the unique id
-
previousPage
Set the previous page for the unique id- Parameters:
uuid- the unique id
-
isCycle
public boolean isCycle()Check if this paginated mask allows cycle page (The first page after the last page)- Returns:
- true if it does
-
setCycle
public void setCycle(boolean cycle) Set if this paginated mask allows cycle page (The first page after the last page)- Parameters:
cycle- true if it does
-