{"id":14969459,"url":"https://github.com/mrmicky-fr/fastboard","last_synced_at":"2025-05-15T07:07:20.079Z","repository":{"id":37911812,"uuid":"164150270","full_name":"MrMicky-FR/FastBoard","owner":"MrMicky-FR","description":"Lightweight packet-based scoreboard API for Bukkit plugins, with 1.7.10 to 1.21.5 support.","archived":false,"fork":false,"pushed_at":"2025-03-28T09:15:42.000Z","size":70,"stargazers_count":518,"open_issues_count":0,"forks_count":52,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-10T06:06:35.125Z","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/MrMicky-FR.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":"2019-01-04T20:08:46.000Z","updated_at":"2025-05-09T13:37:17.000Z","dependencies_parsed_at":"2023-01-21T12:33:47.447Z","dependency_job_id":"7b28ad08-7aeb-440c-83c0-5823da5b6401","html_url":"https://github.com/MrMicky-FR/FastBoard","commit_stats":{"total_commits":49,"total_committers":5,"mean_commits":9.8,"dds":"0.18367346938775508","last_synced_commit":"27bc9d5c09f15746cc31cce13b3fe5ec7c823df6"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMicky-FR%2FFastBoard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMicky-FR%2FFastBoard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMicky-FR%2FFastBoard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMicky-FR%2FFastBoard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrMicky-FR","download_url":"https://codeload.github.com/MrMicky-FR/FastBoard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292042,"owners_count":22046426,"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":"2024-09-24T13:41:53.544Z","updated_at":"2025-05-15T07:07:15.069Z","avatar_url":"https://github.com/MrMicky-FR.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastBoard\n\n[![Java CI](https://github.com/MrMicky-FR/FastBoard/actions/workflows/build.yml/badge.svg)](https://github.com/MrMicky-FR/FastBoard/actions/workflows/build.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/fr.mrmicky/fastboard.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/fr.mrmicky/fastboard)\n[![Discord](https://img.shields.io/discord/390919659874156560.svg?colorB=5865f2\u0026label=Discord\u0026logo=discord\u0026logoColor=white)](https://discord.gg/q9UwaBT)\n\nLightweight packet-based scoreboard API for Bukkit plugins, compatible with all Minecraft versions starting with 1.7.10.\n\n\u003e [!IMPORTANT]\n\u003e To use FastBoard on a 1.8 server, the server must be on 1.8.8.\n\n## Features\n\n* No flickering (without using a buffer)\n* Compatible with all Minecraft versions starting with 1.7.10\n* Small (around 750 lines of code with the JavaDoc) and no dependencies\n* Easy to use\n* Dynamic scoreboard size: you don't need to add/remove lines, you can directly give a string list (or array) to change all the lines\n* Everything is at the packet level, so it works with other plugins using scoreboard and/or teams\n* Can be used asynchronously\n* Supports up to 30 characters per line on 1.12.2 and below\n* No character limit on 1.13 and higher\n* [RGB HEX colors support](#rgb-colors) on 1.16 and higher\n* [Custom number formatting](#custom-number-formatting) (including blank) for scores on 1.20.3 and higher\n* [Adventure components support](#adventure-support)\n* Support for both Spigot and Mojang mappings\n\n## Installation\n\n### Maven\n```xml\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n            \u003cartifactId\u003emaven-shade-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e3.3.0\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cphase\u003epackage\u003c/phase\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003eshade\u003c/goal\u003e\n                    \u003c/goals\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n            \u003cconfiguration\u003e\n                \u003crelocations\u003e\n                    \u003crelocation\u003e\n                        \u003cpattern\u003efr.mrmicky.fastboard\u003c/pattern\u003e\n                        \u003c!-- Replace 'com.yourpackage' with the package of your plugin ! --\u003e\n                        \u003cshadedPattern\u003ecom.yourpackage.fastboard\u003c/shadedPattern\u003e\n                    \u003c/relocation\u003e\n                \u003c/relocations\u003e\n            \u003c/configuration\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003efr.mrmicky\u003c/groupId\u003e\n        \u003cartifactId\u003efastboard\u003c/artifactId\u003e\n        \u003cversion\u003e2.1.4\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n\u003e [!NOTE]\n\u003e When using Maven, make sure to build directly with Maven and not with your IDE configuration (on IntelliJ IDEA: in the `Maven` tab on the right, in `Lifecycle`, use `package`).\n\n### Gradle\n\n```groovy\nplugins {\n    id 'com.gradleup.shadow' version '8.3.0'\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'fr.mrmicky:fastboard:2.1.4'\n}\n\nshadowJar {\n    // Replace 'com.yourpackage' with the package of your plugin \n    relocate 'fr.mrmicky.fastboard', 'com.yourpackage.fastboard'\n}\n```\n\n### Manual\n\nCopy `FastBoardBase.java`, `FastBoard.java` and `FastReflection.java` in your plugin.\n\n## Usage\n\n### Creating a scoreboard\n\nSimply create a new `FastBoard` and update the title and the lines:\n\n```java\nFastBoard board = new FastBoard(player);\n\n// Set the title\nboard.updateTitle(ChatColor.GOLD + \"FastBoard\");\n\n// Change the lines\nboard.updateLines(\n        \"\", // Empty line\n        \"One line\",\n        \"\",\n        \"Second line\"\n);\n```\n\n### Example\n\nSmall example plugin with a scoreboard that refreshes every second:\n\n```java\npackage fr.mrmicky.fastboard.example;\n\nimport fr.mrmicky.fastboard.FastBoard;\nimport org.bukkit.ChatColor;\nimport org.bukkit.Statistic;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.Listener;\nimport org.bukkit.event.player.PlayerJoinEvent;\nimport org.bukkit.event.player.PlayerQuitEvent;\nimport org.bukkit.plugin.java.JavaPlugin;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\n\npublic final class ExamplePlugin extends JavaPlugin implements Listener {\n\n    private final Map\u003cUUID, FastBoard\u003e boards = new HashMap\u003c\u003e();\n\n    @Override\n    public void onEnable() {\n        getServer().getPluginManager().registerEvents(this, this);\n\n        getServer().getScheduler().runTaskTimer(this, () -\u003e {\n            for (FastBoard board : this.boards.values()) {\n                updateBoard(board);\n            }\n        }, 0, 20);\n    }\n\n    @EventHandler\n    public void onJoin(PlayerJoinEvent e) {\n        Player player = e.getPlayer();\n\n        FastBoard board = new FastBoard(player);\n\n        board.updateTitle(ChatColor.RED + \"FastBoard\");\n\n        this.boards.put(player.getUniqueId(), board);\n    }\n\n    @EventHandler\n    public void onQuit(PlayerQuitEvent e) {\n        Player player = e.getPlayer();\n\n        FastBoard board = this.boards.remove(player.getUniqueId());\n\n        if (board != null) {\n            board.delete();\n        }\n    }\n\n    private void updateBoard(FastBoard board) {\n        board.updateLines(\n                \"\",\n                \"Players: \" + getServer().getOnlinePlayers().size(),\n                \"\",\n                \"Kills: \" + board.getPlayer().getStatistic(Statistic.PLAYER_KILLS),\n                \"\"\n        );\n    }\n}\n```\n\n## Adventure support\n\nFor servers on modern [PaperMC](https://papermc.io) versions, FastBoard supports\nusing [Adventure](https://github.com/KyoriPowered/adventure) components instead of strings,\nby using the `fr.mrmicky.fastboard.adventure.FastBoard` class.\n\n\u003e [!WARNING]\n\u003e With Adventure, on servers below Minecraft 1.13, lines are truncated to a maximum of 16 characters.\n\u003e To get around this limit, upgrade to a newer version of Minecraft or use the non-Adventure version (`fr.mrmicky.fastboard.FastBoard`).\n\n## RGB colors\n\nWhen using the non-Adventure version of FastBoard, RGB colors can be added on 1.16 and higher with `ChatColor.of(\"#RRGGBB\")` (`net.md_5.bungee.api.ChatColor` import).\n\n## Custom number formatting\n\nFor servers on Minecraft 1.20.3 and above, FastBoard supports custom number formatting for scores.\nBy default, it uses the blank format, so that no score is visible, but it's also possible to set custom scores using `FastBoard#updateLine(line, text, scoreText)`,\n`FastBoard#updateLines(lines, scores)` and `FastBoard#updateScore(line, text)`.\n\nPassing a `null` value as a score will result in a reset to the default blank formatting.\n\n## ViaBackwards compatibility\n\nWhen using ViaBackwards on a post-1.13 server with pre-1.13 clients, older clients\nmay receive incomplete lines. To solve this problem, you can override the `hasLinesMaxLength()` method and return `true` for older clients.\nFor example using the ViaVersion API:\n```java\nFastBoard board = new FastBoard(player) {\n    @Override\n    public boolean hasLinesMaxLength() {\n        return Via.getAPI().getPlayerVersion(getPlayer()) \u003c ProtocolVersion.v1_13.getVersion(); // or just 'return true;'\n    }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmicky-fr%2Ffastboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmicky-fr%2Ffastboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmicky-fr%2Ffastboard/lists"}