Class BoardManager

java.lang.Object
studio.magemonkey.codex.mccore.scoreboard.BoardManager

public class BoardManager extends Object
Main accessor for player scoreboards
  • Constructor Details

    • BoardManager

      public BoardManager()
  • Method Details

    • init

      public static void init()
      Initializes the scoreboard utility
    • getPlayerBoards

      public static PlayerBoards getPlayerBoards(String player)
      Retrieves scoreboard data for a player
      Parameters:
      player - player
      Returns:
      player's scoreboard data
    • registerTeam

      public static void registerTeam(Team team)
      Registers a new team with all player boards
      Parameters:
      team - team to register
    • updateTeam

      public static void updateTeam(Team team)
      Updates a team with all players
      Parameters:
      team - team to update
    • setTeam

      public static void setTeam(String player, String team)

      Sets the team for a player

      If the team doesn't exist, it will be created with a prefix matching its name

      Parameters:
      player - player to set to the team
      team - team to add the player to
    • clearTeam

      public static void clearTeam(String player)
      Clears the team for the player with the provided name
      Parameters:
      player - player name
    • setTextBelowNames

      public static void setTextBelowNames(String t)
      Sets the text below player names
      Parameters:
      t - text to show
    • setBelowNameScore

      public static void setBelowNameScore(String player, int score)
      Sets the score for a player for below name text
      Parameters:
      player - player to set for
      score - score to set
    • clearScore

      public static void clearScore(String player)
      Clears the score for a player
      Parameters:
      player - player to clear for
    • getAllPlayerBoards

      public static Collection<PlayerBoards> getAllPlayerBoards()
      Returns:
      collection of player data
    • setGlobalHealthBar

      @Deprecated public static void setGlobalHealthBar(String label)
      Deprecated.
      use setTextBelowNames instead
      Sets a label for a health bar under each player's name
      Parameters:
      label - label to set
    • addGlobalScoreboard

      public static void addGlobalScoreboard(Board board)
      Gives the scoreboard to every player
      Parameters:
      board - scoreboard to add
    • clearPluginBoards

      public static void clearPluginBoards(String plugin)
      Clears a board for all players
      Parameters:
      plugin - plugin to clear
    • clearPlayer

      public static void clearPlayer(String name)
      Clears data for a player with a given name
      Parameters:
      name - player name
    • update

      public static void update(org.bukkit.scoreboard.Scoreboard update)
      Copies the scoreboard data from the main scoreboard to the provided scoreboard
      Parameters:
      update - scoreboard to copy to