Interface PlayerBoard<V,N,S>


public interface PlayerBoard<V,N,S>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all the lines of the scoreboard.
    void
    Totally deletes the board, after this, you can't use this instance again, you'll need to create another PlayerBoard if you want to create the scoreboard again.
    get(N score)
    Gets the name of the line from its score.
    Gets the current lines of the board.
    Gets the name of the board.
    void
    remove(N score)
    Removes a line from its score.
    void
    set(V name, N score)
    Sets a line with its name and its score.
    void
    setAll(V... lines)
    Sets all the lines of the scoreboard.
    void
    setName(S name)
    Sets the name of the board.
  • Method Details

    • get

      V get(N score)
      Gets the name of the line from its score.
      Parameters:
      score - the score of the line
      Returns:
      the name of the line, or null if the line doesn't exist.
    • set

      void set(V name, N score)
      Sets a line with its name and its score. This will update the line if it already exists, and create it if it doesn't.
      Parameters:
      name - the name of the line
      score - the score of the line
    • setAll

      void setAll(V... lines)
      Sets all the lines of the scoreboard. This will clear all of the current board lines, then set all of the given lines, from top to down, by giving them each a score determined by lines.length - index.
      Parameters:
      lines - the new board lines
    • clear

      void clear()
      Clears all the lines of the scoreboard.
    • remove

      void remove(N score)
      Removes a line from its score.
      Parameters:
      score - the score of the line to remove
    • delete

      void delete()
      Totally deletes the board, after this, you can't use this instance again, you'll need to create another PlayerBoard if you want to create the scoreboard again.
    • getName

      S getName()
      Gets the name of the board.
      Returns:
      the name of the board
    • setName

      void setName(S name)
      Sets the name of the board.
      Parameters:
      name - the new name of the board
    • getLines

      Map<N,V> getLines()
      Gets the current lines of the board.
      Returns:
      the lines of the board