java.lang.Object
studio.magemonkey.codex.mccore.scoreboard.Board
Direct Known Subclasses:
StatBoard

public abstract class Board extends Object
A manager for a scoreboard
  • Field Details

    • plugin

      protected final String plugin
  • Constructor Details

    • Board

      public Board(String title, String plugin)
      Parameters:
      title - title of the scoreboard
      plugin - plugin owning the scoreboard
  • Method Details

    • setPlayer

      public void setPlayer(org.bukkit.entity.Player player)
      Sets the player for the board
      Parameters:
      player - owning player
    • getName

      public String getName()
      Gets the name of the scoreboard
      Returns:
      scoreboard name
    • set

      protected void set(String label, int score)
      Sets a score to the scoreboard
      Parameters:
      label - label to use
      score - score to show
    • showPlayer

      public boolean showPlayer()
      Shows the board to it's player
    • getPlayer

      protected org.bukkit.entity.Player getPlayer()
    • setHealthLabel

      @Deprecated public void setHealthLabel(String label)
      Deprecated.
      use setTextBelowNames in BoardManager instead
      Sets the health objective for the scoreboard - Recommended not to use this method - - Use PlayerBoard or BoardManager instead -
      Parameters:
      label - scoreboard label
    • clearDisplay

      public void clearDisplay()
      Clears the side board display
    • hashCode

      public int hashCode()
      Hashes by name
      Overrides:
      hashCode in class Object
      Returns:
      name hash
    • equals

      public boolean equals(Object other)
      Equates by name
      Overrides:
      equals in class Object
      Parameters:
      other - other board to equate to
      Returns:
      true if titles are equal
    • getScoreboard

      public org.bukkit.scoreboard.Scoreboard getScoreboard()