{"id":28088916,"url":"https://github.com/catcoderr/protocolsidebar","last_synced_at":"2025-05-13T12:52:25.177Z","repository":{"id":47473470,"uuid":"105431356","full_name":"CatCoderr/ProtocolSidebar","owner":"CatCoderr","description":"Powerful feature-packed Minecraft scoreboard library","archived":false,"fork":false,"pushed_at":"2025-05-06T17:10:59.000Z","size":2322,"stargazers_count":181,"open_issues_count":10,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-11T07:34:15.300Z","etag":null,"topics":["api","bukkit","minecraft","scoreboard","scoreboard-api","spigot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CatCoderr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-01T09:20:18.000Z","updated_at":"2025-05-09T13:36:02.000Z","dependencies_parsed_at":"2023-11-14T16:45:11.004Z","dependency_job_id":"47708899-7a62-4736-b309-6096920fbbcf","html_url":"https://github.com/CatCoderr/ProtocolSidebar","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatCoderr%2FProtocolSidebar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatCoderr%2FProtocolSidebar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatCoderr%2FProtocolSidebar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CatCoderr%2FProtocolSidebar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CatCoderr","download_url":"https://codeload.github.com/CatCoderr/ProtocolSidebar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253947707,"owners_count":21988942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bukkit","minecraft","scoreboard","scoreboard-api","spigot"],"created_at":"2025-05-13T12:52:24.299Z","updated_at":"2025-05-13T12:52:25.160Z","avatar_url":"https://github.com/CatCoderr.png","language":"Java","funding_links":["https://www.buymeacoffee.com/catcoderr"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  ProtocolSidebar\n\u003c/h1\u003e\n  \u003cp align=\"center\"\u003ePowerful feature-packed Minecraft scoreboard library\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca target=\"_blank\"\u003e\u003cimg src=\"https://github.com/CatCoderr/ProtocolSidebar/actions/workflows/build.yaml/badge.svg\" alt=\"Build\" /\u003e\u003c/a\u003e\n\u003ca target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/license/CatCoderr/ProtocolSidebar\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003ca target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Minecraft%20Versions-1.12.2--1.21.2-blue?style=flat\" alt=\"Minecraft Versions\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n* [Features](#features)\n* [Adding to your project](#adding-to-your-project)\n    * [Maven](#maven)\n    * [Gradle](#gradle)\n    * [Gradle (Kotlin DSL)](#gradle-kotlin-dsl)\n* [Basic usage](#basic-usage)\n* [Conditional lines](#conditional-lines)\n* [Score number formatting](#score-number-formatting)\n* [Sidebar title animations](#sidebar-title-animations)\n* [Sidebar Pager](#sidebar-pager)\n\n![Sidebar](https://github.com/CatCoderr/ProtocolSidebar/raw/master/assets/sidebar.gif)\n\n\n## Donations\n[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate%20Now-yellow?style=for-the-badge\u0026logo=buy-me-a-coffee)](https://www.buymeacoffee.com/catcoderr)\n\n\n## Features\n\n* No flickering (without using a buffer)\n* Does not require any additional libraries/plugins on the server\n* Easy to use\n* Folia support\n* Optionally supports [Adventure API](https://docs.advntr.dev/text.html), [MiniMessage](https://docs.advntr.dev/minimessage/index.html), [MiniPlaceholders](https://github.com/MiniPlaceholders/MiniPlaceholders)\n* Extremely fast, can be used asynchronously\n* Cool inbuilt animations\n* Inbuilt pager for showing multiple sidebars to the player\n* Automatic score management system: sidebar reorders lines automatically\n* Everything is at the packet level, so it works with other plugins using scoreboard and/or teams\n* Supports up to 30 characters per line on 1.12.2 and below\n* No character limit on 1.13 and higher\n* Supports hex colors on 1.16 and higher\n* Minimized NMS interaction, means that packets are constructed at the byte buffer level and then sent directly to the player's channel.\n\n## Adding To Your Project\n\nInstead of manually bundling the library into your JAR file, you can\nuse [the standalone plugin](https://github.com/CatCoderr/ProtocolSidebar/tree/master/standalone-plugin).\n\nSimply run `./gradlew clean shadowJar` and put the resulting JAR file located in `bin` folder into your plugins folder.\n\nIn other cases, you must use something like [shadow](https://imperceptiblethoughts.com/shadow/) (for Gradle)\nor [maven-shade-plugin](https://maven.apache.org/plugins/maven-shade-plugin/) (for Maven).\n\n### Maven\n\n```xml\n\u003crepository\u003e\n    \u003cid\u003ecatcoder-snapshots\u003c/id\u003e\n    \u003curl\u003ehttps://catcoder.pl.ua/snapshots\u003c/url\u003e\n\u003c/repository\u003e\n```\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eme.catcoder\u003c/groupId\u003e\n    \u003cartifactId\u003ebukkit-sidebar\u003c/artifactId\u003e\n    \u003cversion\u003e6.2.10-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n```groovy\nrepositories {\n    maven { url 'https://catcoder.pl.ua/snapshots' }\n}\n```\n```groovy\ndependencies {\n    implementation 'me.catcoder:bukkit-sidebar:6.2.10-SNAPSHOT'\n}\n```\n\n### Gradle (Kotlin DSL)\n\n```kotlin\nrepositories {\n    maven(\"https://catcoder.pl.ua/snapshots\")\n}\n```\n```kotlin\ndependencies {\n    implementation(\"me.catcoder:bukkit-sidebar:6.2.10-SNAPSHOT\")\n}\n```\n\n## Basic Usage\n\n```java\n// create sidebar which uses Adventure API\n// you can also use other methods from ProtocolSidebar class\n// for another text providers such as BungeeCord Chat, MiniMessage...\nSidebar\u003cComponent\u003e sidebar = ProtocolSidebar.newAdventureSidebar(\n        TextIterators.textFadeHypixel(\"SIDEBAR\"), this);\n\n// let's add some lines\nsidebar.addLine(\n    Component.text(\"Just a static line\").color(NamedTextColor.GREEN));\n// add an empty line\nsidebar.addBlankLine();\n// also you can add updatable lines which applies to all players receiving this sidebar\nsidebar.addUpdatableLine(\n    player -\u003e Component.text(\"Your Hunger: \")\n        .append(Component.text(player.getFoodLevel())\n        .color(NamedTextColor.GREEN))\n    );\n\nsidebar.addBlankLine();\nsidebar.addUpdatableLine(\n    player -\u003e Component.text(\"Your Health: \")\n        .append(Component.text(player.getHealth())\n        .color(NamedTextColor.GREEN))\n);\nsidebar.addBlankLine();\nsidebar.addLine(\n    Component.text(\"https://github.com/CatCoderr/ProtocolSidebar\")\n        .color(NamedTextColor.YELLOW\n));\n\n// update all lines except static ones every 10 ticks\nsidebar.updateLinesPeriodically(0, 10);\n\n// ...\n\n// show to the player\nsidebar.addViewer(player);\n// ...hide from the player\nsidebar.removeViewer(player);\n```\n![Example](https://github.com/CatCoderr/ProtocolSidebar/raw/master/assets/nice_example.gif)\n\n## Conditional Lines\nThe visibility of these lines depends on the condition you set.\nIf the condition is true, the line will be shown, otherwise it will be hidden.\nIt's an updatable line, so it will update along with other updatable lines.\n\n## Score number formatting\nYou can use `scoreNumberFormat` method in both `ScoreboardObjective` and `SidebarLine` classes to format score numbers.\n\nThis feature is available starting from 1.20.4 version.\n```java\n// removes scores completely for all lines\nsidebar.getObjective().scoreNumberFormatBlank();\n// set's custom fixed text for all lines\nsidebar.getObjective().scoreNumberFormatFixed(player -\u003e Component.text(\"Test\").color(NamedTextColor.BLUE));\n\n// set's score number format for specific line (overrides objective's format)\nvar line = sidebar.addLine(Component.text(\"Some line\").color(NamedTextColor.YELLOW));\nline.scoreNumberFormatFixed(player -\u003e Component.text(\"Test\").color(NamedTextColor.BLUE));\n```\n\n## Sidebar Title Animations\n\nLibrary has built-in title animations, but you can also create your [own](https://github.com/CatCoderr/ProtocolSidebar/blob/master/src/main/java/me/catcoder/sidebar/text/TextIterator.java).\n![Hypixel-like animation](https://github.com/CatCoderr/ProtocolSidebar/raw/master/assets/animation_example.gif)\n\nAnimations also can be used in updatable lines:\n\n```java\nTextIterator animation = TextIterators.textFadeHypixel(\"Hello World!\");\nSidebarLine\u003c?\u003e line = sidebar.addUpdatableLine(sidebar.asLineUpdater(animation));\n\nline.updatePeriodically(0, 1, sidebar);\n```\n\n## Sidebar Pager\n\nYou can also use sidebar pager, which allows you to show player multiple pages of information.\n```java\nSidebar\u003cComponent\u003e anotherSidebar = ProtocolSidebar.newAdventureSidebar(\n        TextIterators.textFadeHypixel(\"ANOTHER SIDEBAR\"), this);\n\nSidebar\u003cComponent\u003e firstSidebar = ProtocolSidebar.newAdventureSidebar(\n        TextIterators.textFadeHypixel(\"SIDEBAR\"), this);\n\nSidebarPager\u003cComponent\u003e pager = new SidebarPager\u003c\u003e(\n        Arrays.asList(firstSidebar, anotherSidebar), 20 * 5, this);\n\n// add page status line to all sidebars in pager\npager.addPageLine((page, maxPage, sidebar) -\u003e\n        sidebar.addLine(Component.text(\"Page \" + page + \"/\" + maxPage)\n            .color(NamedTextColor.GREEN)));\n\npager.applyToAll(Sidebar::addBlankLine);\n\n// ...add some lines\n\n// show to player\npager.show(player);\n\n// ...\n// hide from the player\npager.hide(player);\n```\n\n![Pager example](https://github.com/CatCoderr/ProtocolSidebar/raw/master/assets/pager_example.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatcoderr%2Fprotocolsidebar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatcoderr%2Fprotocolsidebar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatcoderr%2Fprotocolsidebar/lists"}