- Some parts of the scoreboard code were rewritten (slight performance boost)
- Changed "no name color" message to understand better what to do
- Added the following placeholders: %mem_total%; %mem_free%; %mem_used%; %mem_max%
- Increased max 64 chars to 126 chars so you can really annoy your players by putting a scoreboard over the whole screen (please don't do that, i just increased this because i can)
- You can now use HEX colors! (Chat, Scoreboard, Tablist, Ranks)
- Added a new API
- Added to API: You can now set the scoreboard with the API
- Added to API: You can now enable/disable the scoreboard for a single player
- Added to API: You can now finally add your own placeholders
How to use the API:
Set custom Placeholders:
Code (Java):
CustomPlaceholders ph
=
new CustomPlaceholders
(
)
{
@Override
public
String replace
(Player p,
String s
)
{
if
(s.
contains
(
"%my_placeholder%"
)
)
{
// To save a bit performance
s
= s.
replace
(
"%my_placeholder%",
"It works!"
)
;
// Replace the placeholder
}
return s
;
// Return the modified string
}
}
;
ScoreboardAPI.
registerCustomPlaceholders
(ph
)
;
Enable/Disable the scoreboard for a specified player:
Code (Java):
ScoreboardAPI.
getPlayer
(p
).
enableScoreboard
(
)
;
or
ScoreboardAPI.
getPlayer
(p
).
disableScoreboard
(
)
;
Set a completely custom Scoreboard:
Code (Java):
ScoreboardAPI.
getPlayer
(p
).
setScoreboardTitle
(title,
true
)
;
// After that we can set the scores:
// The index is the red number of the right side from the scoreboard
ScoreboardAPI.
getPlayer
(p
).
setScoreboardScore
(score, index,
true
)
;
- Fixed: "Errors were found" message if there weren't any errors
- Fixed: error check in "self-check"
- Fixed: Teams are now unregistered after the server restarts to prevent that the player's prefix/suffix won't be removed
- Fixed: "[Scoreboard] The tablist config file is empty or the header/footer is not configurated!" fix when direct join after plugin enable
- Fixed: Error messages from tablist sometimes when a player joins were fixed
- Fixed: Plugin now doesn't use default configuration to work properly