Class BoardManager
java.lang.Object
studio.magemonkey.codex.mccore.scoreboard.BoardManager
Main accessor for player scoreboards
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddGlobalScoreboard(Board board) Gives the scoreboard to every playerstatic voidclearPlayer(String name) Clears data for a player with a given namestatic voidclearPluginBoards(String plugin) Clears a board for all playersstatic voidclearScore(String player) Clears the score for a playerstatic voidClears the team for the player with the provided namestatic Collection<PlayerBoards> static PlayerBoardsgetPlayerBoards(String player) Retrieves scoreboard data for a playerstatic voidinit()Initializes the scoreboard utilitystatic voidregisterTeam(Team team) Registers a new team with all player boardsstatic voidsetBelowNameScore(String player, int score) Sets the score for a player for below name textstatic voidsetGlobalHealthBar(String label) Deprecated.use setTextBelowNames insteadstatic voidSets the team for a playerstatic voidSets the text below player namesstatic voidupdate(org.bukkit.scoreboard.Scoreboard update) Copies the scoreboard data from the main scoreboard to the provided scoreboardstatic voidupdateTeam(Team team) Updates a team with all players
-
Constructor Details
-
BoardManager
public BoardManager()
-
-
Method Details
-
init
public static void init()Initializes the scoreboard utility -
getPlayerBoards
Retrieves scoreboard data for a player- Parameters:
player- player- Returns:
- player's scoreboard data
-
registerTeam
Registers a new team with all player boards- Parameters:
team- team to register
-
updateTeam
Updates a team with all players- Parameters:
team- team to update
-
setTeam
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 teamteam- team to add the player to
-
clearTeam
Clears the team for the player with the provided name- Parameters:
player- player name
-
setTextBelowNames
Sets the text below player names- Parameters:
t- text to show
-
setBelowNameScore
Sets the score for a player for below name text- Parameters:
player- player to set forscore- score to set
-
clearScore
Clears the score for a player- Parameters:
player- player to clear for
-
getAllPlayerBoards
- Returns:
- collection of player data
-
setGlobalHealthBar
Deprecated.use setTextBelowNames insteadSets a label for a health bar under each player's name- Parameters:
label- label to set
-
addGlobalScoreboard
Gives the scoreboard to every player- Parameters:
board- scoreboard to add
-
clearPluginBoards
Clears a board for all players- Parameters:
plugin- plugin to clear
-
clearPlayer
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
-