Class Scoreboard
java.lang.Object
me.remigio07.chatplugin.api.server.scoreboard.Scoreboard
Represents a scoreboard handled by the
ScoreboardManager
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the builder used to createScoreboard
s usingScoreboardManager.createScoreboardBuilder(String, boolean, List)
. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addPlayer
(ChatPluginServerPlayer player) Adds a player togetPlayers()
.Gets the configuration associated with this scoreboard.getID()
Gets this scoreboard's ID.getLines()
Gets this scoreboard's lines.Gets this scoreboard's numbers.Gets the list of placeholder types used to translategetTitles()
andgetLines()
.Gets the list of players this scoreboard is being displayed to.Gets this scoreboard's titles.getType()
Gets this scoreboard's type.abstract void
removePlayer
(ChatPluginServerPlayer player) Removes a player fromgetPlayers()
.boolean
Checks if text (scoreboards' lines and titles) should be abbreviated by adding "..." at the end when it is too long to be displayed instead ofScoreboardTitles.TITLE_TOO_LONG
orScoreboardLines.LINE_TOO_LONG
.
-
Field Details
-
SCORES
Represents the scores' names used by the scoreboard.
-
-
Constructor Details
-
Scoreboard
public Scoreboard()
-
-
Method Details
-
getID
Gets this scoreboard's ID.- Returns:
- Scoreboard's ID
-
getType
Gets this scoreboard's type.- Returns:
- Scoreboard's type
-
getConfiguration
Gets the configuration associated with this scoreboard.Will return
null
if this scoreboard was created usingScoreboardManager.createScoreboardBuilder(String, boolean, List)
.- Returns:
- Associated configuration
-
getTitles
Gets this scoreboard's titles.- Returns:
- Scoreboard's titles
-
getLines
Gets this scoreboard's lines.- Returns:
- Scoreboard's lines
-
getNumbers
Gets this scoreboard's numbers.- Returns:
- Scoreboard's numbers
-
shouldAbbreviateLongText
public boolean shouldAbbreviateLongText()Checks if text (scoreboards' lines and titles) should be abbreviated by adding "..." at the end when it is too long to be displayed instead ofScoreboardTitles.TITLE_TOO_LONG
orScoreboardLines.LINE_TOO_LONG
.Found at: "settings.abbreviate-long-text" in
getConfiguration()
- Returns:
- Whether to abbreviate long text
-
getPlaceholderTypes
Gets the list of placeholder types used to translategetTitles()
andgetLines()
.Found at: "settings.placeholder-types" in
getConfiguration()
- Returns:
- Placeholders used to translate titles and lines
-
getPlayers
Gets the list of players this scoreboard is being displayed to.Do not modify the returned list. Use
addPlayer(ChatPluginServerPlayer)
andremovePlayer(ChatPluginServerPlayer)
to interact with it.- Returns:
- Scoreboard's players
-
addPlayer
Adds a player togetPlayers()
.- Parameters:
player
- Player to add- See Also:
-
removePlayer
Removes a player fromgetPlayers()
.- Parameters:
player
- Player to remove- See Also:
-