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

public abstract class PaginatedMask extends BaseMask
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected final Map<UUID,Integer>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PaginatedMask(@NotNull String name)
    Create a new mask
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getExactPage(int page, @NotNull UUID uuid)
    Get the exact page from the input page for the unique id
    int
    getPage(@NotNull UUID uuid)
    Get the current page for the unique id
    abstract int
    getPageAmount(@NotNull UUID uuid)
    Get the amount of pages for the unique id
    boolean
    Check if this paginated mask allows cycle page (The first page after the last page)
    void
    nextPage(@NotNull UUID uuid)
    Set the next page for the unique id
    void
    previousPage(@NotNull UUID uuid)
    Set the previous page for the unique id
    void
    setCycle(boolean cycle)
    Set if this paginated mask allows cycle page (The first page after the last page)
    void
    setPage(@NotNull UUID uuid, int page)
    Set the page for the unique id

    Methods inherited from class me.hsgamer.hscore.minecraft.gui.mask.BaseMask

    getName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface me.hsgamer.hscore.ui.property.Initializable

    init, stop

    Methods inherited from interface me.hsgamer.hscore.minecraft.gui.mask.Mask

    canView, generateButtons
  • Field Details

    • pageNumberMap

      protected final Map<UUID,Integer> pageNumberMap
    • cycle

      protected boolean cycle
  • Constructor Details

    • PaginatedMask

      protected PaginatedMask(@NotNull @NotNull String name)
      Create a new mask
      Parameters:
      name - the name of the mask
  • Method Details

    • getPageAmount

      public abstract int getPageAmount(@NotNull @NotNull UUID uuid)
      Get the amount of pages for the unique id
      Parameters:
      uuid - the unique id
      Returns:
      the amount of pages
    • setPage

      public void setPage(@NotNull @NotNull UUID uuid, int page)
      Set the page for the unique id
      Parameters:
      uuid - the unique id
      page - the page
    • getExactPage

      public int getExactPage(int page, @NotNull @NotNull UUID uuid)
      Get the exact page from the input page for the unique id
      Parameters:
      page - the input page
      uuid - the unique id
      Returns:
      the exact page
    • getPage

      public int getPage(@NotNull @NotNull UUID uuid)
      Get the current page for the unique id
      Parameters:
      uuid - the unique id
      Returns:
      the page number
    • nextPage

      public void nextPage(@NotNull @NotNull UUID uuid)
      Set the next page for the unique id
      Parameters:
      uuid - the unique id
    • previousPage

      public void previousPage(@NotNull @NotNull UUID uuid)
      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