Class ScoreboardLines.ScoreboardLine
java.lang.Object
java.util.TimerTask
me.remigio07.chatplugin.api.server.scoreboard.ScoreboardLines.ScoreboardLine
- All Implemented Interfaces:
Runnable
- Enclosing class:
ScoreboardLines
Represents a
Scoreboard
's line.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Gets this line's index inScoreboardLines.getLines()
.getLines()
Gets the lines associated with this line.long
Gets the timeout between sendings, in milliseconds.Gets therun()
's timer's indexes ofgetValues()
.Gets this line's values.Gets this line's values for the specified language.boolean
Checks if the values should be sent in a random order.abstract void
run()
Automatic line sender, called once everygetSendingTimeout()
ms.Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
ScoreboardLine
public ScoreboardLine()
-
-
Method Details
-
getLines
Gets the lines associated with this line.- Returns:
- Associated lines
-
getValues
Gets this line's values.You may modify the returned map, but it cannot point to a
null
value forLanguage.getMainLanguage()
and empty Lists are not allowed.Found at: "lines." +
getLineIndex()
+ ".values" inScoreboard.getConfiguration()
- Returns:
- Line's values
-
getValues
Gets this line's values for the specified language.Specify
true
asavoidNull
to fall back toLanguage.getMainLanguage()
's values if no values are present for the specified language. Will returnnull
ifgetValues()
.get(language) == null && !avoidNull
.- Parameters:
language
- Language used to translate the valuesavoidNull
- Whether to avoid returningnull
- Returns:
- Line's values
-
getTimerIndexes
Gets therun()
's timer's indexes ofgetValues()
.- Returns:
- Titles' timer's indexes
-
getLineIndex
public int getLineIndex()Gets this line's index inScoreboardLines.getLines()
.- Returns:
- Line's index (0 - 14)
-
isRandomOrder
public boolean isRandomOrder()Checks if the values should be sent in a random order.Found at: "lines." +
getLineIndex()
+ ".random-order" inScoreboard.getConfiguration()
- Returns:
- Whether to use a random order
-
getSendingTimeout
public long getSendingTimeout()Gets the timeout between sendings, in milliseconds.Found at: "lines." +
getLineIndex()
+ ".sending-timeout-ms" inScoreboard.getConfiguration()
- Returns:
- Time between sendings
-
run
public abstract void run()Automatic line sender, called once everygetSendingTimeout()
ms.
-