Class ScoreboardNumbers

java.lang.Object
java.util.TimerTask
me.remigio07.chatplugin.api.server.scoreboard.ScoreboardNumbers
All Implemented Interfaces:
Runnable

public abstract class ScoreboardNumbers extends TimerTask
Represents a Scoreboard's numbers.
  • Constructor Details

    • ScoreboardNumbers

      public ScoreboardNumbers()
  • Method Details

    • getScoreboard

      public Scoreboard getScoreboard()
      Gets the scoreboard associated with these numbers.
      Returns:
      Associated scoreboard
    • getDisplayMode

      public NumbersDisplayMode getDisplayMode()
      Gets these numbers' display mode.

      Found at: "settings.numbers.display-mode" in Scoreboard.getConfiguration()

      Returns:
      Numbers' display mode
    • getCustomTextValue

      public String getCustomTextValue()
      Gets these numbers' custom text's value.

      Found at: "settings.numbers.custom-text.value" in Scoreboard.getConfiguration()

      Returns:
      Numbers' custom text's value
    • getCustomTextColorsCycleTimeout

      public long getCustomTextColorsCycleTimeout()
      Gets the timeout between color cycles, in milliseconds.

      Found at: "settings.numbers.custom-text.colors.cycle-timeout" in Scoreboard.getConfiguration()

      Returns:
      Time between color cycles
    • getCustomTextColorsInterpolations

      public int getCustomTextColorsInterpolations()
      Gets the amount of interpolations (or variations) between each color of customTextColorsGradient.

      Found at: "settings.numbers.custom-text.colors.interpolations" in Scoreboard.getConfiguration()

      Returns:
      Interpolations between provided colors
    • getCustomTextColorsGradient

      public List<ChatColor> getCustomTextColorsGradient()
      Gets the colors used to create the gradient.

      Do not modify the returned list.

      Found at: "settings.numbers.custom-text.colors.gradient" in Scoreboard.getConfiguration()

      Returns:
      Colors to cycle through
    • getCustomTextColorsInterpolated

      public List<ChatColor> getCustomTextColorsInterpolated()
      Gets the colors interpolated using variants of the original colors.

      Do not modify the returned list.

      Returns:
      Interpolated colors
    • getTimerIndex

      public int getTimerIndex()
      Gets the run()'s timer's index of getCustomTextColorsInterpolated().
      Returns:
      Numbers' timer's index
    • run

      public abstract void run()
      Automatic color updater, called once every getCustomTextColorsCycleTimeout() ms.
      Specified by:
      run in interface Runnable
      Specified by:
      run in class TimerTask