A non flicker scoreboard library. Requires ProtocolLib to work. Optionally supports ViaVersion.
Library has built-in animations, but you can also create your
own.
More examples are available on
GitHub page.
If you have found a bug, please report it to me in the
issue tracker.
How to use it?
Code (Java):
Sidebar sidebar
=
new Sidebar
(TextIterators.
textFadeHypixel
(
"Hello World!"
),
this
)
;
sidebar.
addLine
(
"Test Static Line"
)
;
// supports legacy color codes
sidebar.
addBlankLine
(
)
;
// Supports modern chat components
sidebar.
addUpdatableLine
(player
->
new ComponentBuilder
(
"Your Health: "
)
.
append
(player.
getHealth
(
)
+
""
)
.
color
(ChatColor.
GREEN
)
.
create
(
)
)
;
sidebar.
addBlankLine
(
)
;
sidebar.
addUpdatableLine
(player
->
new ComponentBuilder
(
"Your Hunger: "
)
.
append
(player.
getFoodLevel
(
)
+
""
)
.
color
(ChatColor.
GREEN
)
.
create
(
)
)
;
sidebar.
addBlankLine
(
)
;
// Long lines will be truncated if player version < 1.13
sidebar.
addLine
(
"§ehttps://github.com/CatCoderr/ProtocolSidebar"
)
;
// Update all dynamic lines every 20 ticks
sidebar.
updateLinesPeriodically
(0L, 20L,
this
)
;
Display our sidebar to the player:
Code (Java):
@EventHandler
public
void onPlayerJoin
(PlayerJoinEvent event
)
{
sidebar.
addViewer
(event.
getPlayer
(
)
)
;
}