Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

ProtocolSidebar

> 编程语言
Open source

Powerful feature-packed Minecraft scoreboard library

197 stars0 likes1 views
WebsiteGitHub

About

Powerful feature-packed Minecraft scoreboard library

ProtocolSidebar

Powerful feature-packed Minecraft scoreboard library

  • Features
  • Adding to your project
    • Maven
    • Gradle
    • Gradle (Kotlin DSL)
  • Basic usage
  • Conditional lines
  • Conditional titles
  • Line limits
  • Score number formatting
  • Sidebar title animations
  • Sidebar Pager

Features

  • No flickering (without using a buffer)
  • Does not require any additional libraries/plugins on the server
  • Easy to use
  • Folia support
  • Optionally supports Adventure API, MiniMessage, MiniPlaceholders
  • Extremely fast, can be used asynchronously
  • Cool inbuilt animations
  • Inbuilt pager for showing multiple sidebars to the player
  • Automatic score management system: sidebar reorders lines automatically
  • Everything is at the packet level, so it works with other plugins using scoreboard and/or teams
  • Supports up to 30 characters per line on 1.12.2 and below
  • No character limit on 1.13 and higher
  • Supports hex colors on 1.16 and higher
  • Minimized NMS interaction, means that packets are constructed at the byte buffer level and then sent directly to the player's channel.

Adding To Your Project

Instead of manually bundling the library into your JAR file, you can use the standalone plugin.

Simply run ./gradlew clean shadowJar and put the resulting JAR file located in bin folder into your plugins folder.

In other cases, you must use something like shadow (for Gradle) or maven-shade-plugin (for Maven).

Maven

xml

    jitpack.io
    https://jitpack.io
xml

    com.github.CatCoderr
    ProtocolSidebar
    6.2.10-SNAPSHOT

Gradle

groovy
repositories {
    maven { url 'https://jitpack.io' }
}
groovy
dependencies {
    implementation 'com.github.CatCoderr:ProtocolSidebar:6.2.10-SNAPSHOT'
}

Gradle (Kotlin DSL)

kotlin
repositories {
    maven("https://jitpack.io")
}
kotlin
dependencies {
    implementation("com.github.CatCoderr:ProtocolSidebar:6.2.10-SNAPSHOT")
}

Basic Usage

…

Conditional Lines

The visibility of these lines depends on the condition you set. If the condition is true, the line will be shown, otherwise it will be hidden. It's an updatable line, so it will update along with other updatable lines.

Score number formatting

You can use scoreNumberFormat method in both ScoreboardObjective and SidebarLine classes to format score numbers.

This feature is available starting from 1.20.4 version.

java
// removes scores completely for all lines
sidebar.getObjective().scoreNumberFormatBlank();
// set's custom fixed text for all lines
sidebar.getObjective().scoreNumberFormatFixed(player -> Component.text("Test").color(NamedTextColor.BLUE));

// set's score number format for specific line (overrides objective's format)
var line = sidebar.addLine(Component.text("Some line").color(NamedTextColor.YELLOW));
line.scoreNumberFormatFixed(player -> Component.text("Test").color(NamedTextColor.BLUE));

Conditional Titles

The title can be chosen per player, so one Sidebar instance can show a different title to each viewer. For example a shorter title for legacy clients.

The simplest form is a function that receives the player:

java
sidebar.setTitle(player -> isVip(player) ? vipTitle : normalTitle);

For a list of conditions, use ConditionalTitle. Conditions are checked in the order they were added and the first match wins. otherwise is required, because a player matching no condition has to be given some title:

java
import static me.catcoder.sidebar.util.PlayerPredicates.*;
import static me.catcoder.sidebar.protocol.ProtocolConstants.*;

sidebar.setTitle(ConditionalTitle.create()
        .when(clientVersionAtMost(MINECRAFT_1_8), Component.text("Legacy"))
        .when(clientVersionAtLeast(MINECRAFT_1_19), Component.text("Modern"))
        .when(player -> player.getName().equals("playerA"), Component.text("Hello!"))
        .otherwise(Component.text("Default")));

Client versions are resolved through ViaVersion. Without ViaVersion installed, every player reports the server version.

The title is resolved for every objective packet, so it is re-evaluated whenever a player is added as a viewer. There is no automatic tick: if your conditions depend on state that changes later (rank, world, game phase), call sidebar.updateTitle().

setTitle snapshots the conditions, so mutating the ConditionalTitle afterwards has no effect.

PlayerPredicates also works with conditional lines:

java
sidebar.addConditionalLine(player -> Component.text("1.8 only"), clientVersionAtMost(MINECRAFT_1_8));

Setting a plain title again with setTitle(component) clears the conditional title.

To read the title as a specific player sees it, use getObjective().getDisplayName(player). The no-argument getDisplayName() returns the static title only.

Line limits

A sidebar has two different limits:

  • Sidebar.MAX_VISIBLE_LINES (15) how many lines the client renders. Beyond this it shows the highest scored lines and drops the rest.
  • Sidebar.MAX_LINES_COUNT (22) how many lines a sidebar can hold. Every line permanently owns one unique invisible team entry, visible or not, and that alphabet runs out at 22.

Since conditional lines are hidden per player, a sidebar may hold more lines than the client renders, as long as no player ever sees more than 15 at once. addLine therefore only rejects what cannot work: a 23rd line of any kind, or a 16th line without a display condition. If a player does end up with more than 15 visible lines, a warning is logged once per sidebar.

Sidebar Title Animations

Library has built-in title animations, but you can also create your own.

Animations also can be used in updatable lines:

java
TextIterator animation = TextIterators.textFadeHypixel("Hello World!");
SidebarLine line = sidebar.addUpdatableLine(sidebar.asLineUpdater(animation));

line.updatePeriodically(0, 1, sidebar);

Sidebar Pager

You can also use sidebar pager, which allows you to show player multiple pages of information.

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaapibukkitminecraftscoreboard

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言