SimpleFabricScoreboardAPI
A lightweight Kotlin module for Minecraft Fabric providing a simple and flexible API for managing scoreboards.
截图
介绍
SimpleFabricScoreboard
SimpleFabricScoreboard is a lightweight library for Minecraft Fabric that provides a simple way to create, update, and manage sidebar scoreboards.
The project is built for mod developers who want a clean and practical API for scoreboard handling without having to work directly with all of Minecraft’s lower-level scoreboard logic. The goal is to keep the library small, easy to integrate, and straightforward to use in real Fabric projects.
What it does
SimpleFabricScoreboard helps you create sidebar scoreboards for players and update them dynamically during gameplay. It is designed for common use cases such as lobbies, minigames, player stats, event displays, and other situations where you want to show structured information on the side of the screen.
The library focuses on a developer-friendly Kotlin API and a compact workflow:
- create a scoreboard
- add lines
- assign it to a player
- update or remove it later
Features
- Simple scoreboard creation
- Dynamic line updates
- Clean Kotlin-oriented API
- Per-player scoreboard management
- Packet-based sidebar updates
- Easy integration into existing Fabric mods
- Lightweight design with minimal overhead
- Useful for both static and frequently changing sidebars
Example
val board = scoreboard("test_board", Component.literal("Test Board"), server) {
+Component.literal("Line 1")
+Component.literal("Line 2")
+emptyLine()
+Component.literal("Line 4")
line(5, Component.literal("Special Line"))
}
ScoreboardManager.setPlayerScoreboard(player, board)
board.update {
line(2, Component.literal("Updated Line 2"))
+emptyLine()
+Component.literal("Another Line")
}
常见问题
SimpleFabricScoreboardAPI 支持哪些 Minecraft 版本?
SimpleFabricScoreboardAPI 支持 Minecraft Java 版 1.21.5–26.1.2,共 9 个版本,可用的加载器:Fabric / Quilt。下载时注意选择和你游戏版本一致的文件。
SimpleFabricScoreboardAPI 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
评论
登录后评论和评分