Class PlayerBoards
java.lang.Object
studio.magemonkey.codex.mccore.scoreboard.PlayerBoards
Scoreboard data for a player
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether the player's scoreboard is cycling -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a scoreboard for the playerGets the active board for the playerRetrieves a board managerorg.bukkit.entity.PlayerbooleanChecks whether the player has an active scoreboardbooleanbooleanvoidremoveBoard(Board board) Removes a board from a playervoidremoveBoards(String plugin) Removes all boards from a pluginvoidsetHealthLabel(String label) Deprecated.use BoardManager.setTextBelowNames insteadbooleanShows a scoreboard for the playervoidShows the next scoreboardvoidMakes the player's scoreboard cyclevoidMakes the player's scoreboard stop cyclingvoidtoggle()Toggles visibility of the scoreboard
-
Field Details
-
cycling
protected boolean cyclingWhether the player's scoreboard is cycling
-
-
Constructor Details
-
PlayerBoards
Constructor- Parameters:
playerName- name of the player
-
-
Method Details
-
toggle
public void toggle()Toggles visibility of the scoreboard -
getPlayer
public org.bukkit.entity.Player getPlayer()- Returns:
- owning player reference
-
addBoard
Adds a scoreboard for the player- Parameters:
board- board to add
-
removeBoard
Removes a board from a player- Parameters:
board- board to remove
-
removeBoards
Removes all boards from a plugin- Parameters:
plugin- plugin name
-
showBoard
Shows a scoreboard for the player- Parameters:
name- name of the scoreboard- Returns:
- true if successful, false otherwise
-
showNextBoard
public void showNextBoard()Shows the next scoreboard -
getBoard
Retrieves a board manager- Parameters:
name- scoreboard name- Returns:
- board manager
-
getActiveBoard
Gets the active board for the player- Returns:
- active board
-
hasActiveBoard
public boolean hasActiveBoard()Checks whether the player has an active scoreboard- Returns:
- if the player has an active scoreboard
-
startCycling
public void startCycling()Makes the player's scoreboard cycle -
stopCycling
public void stopCycling()Makes the player's scoreboard stop cycling -
setHealthLabel
Deprecated.use BoardManager.setTextBelowNames insteadSets the health label for this player- Parameters:
label- health label
-
getBoards
- Returns:
- the boards attached to the player
-
getPlayerName
- Returns:
- name of the owning player
-
isCycling
public boolean isCycling()- Returns:
- true if cycling, false otherwise
-
isEnabled
public boolean isEnabled()- Returns:
- true if enabled, false otherwise
-