PlayTimeBoard
English
Description
PlayTimeBoard is a Fabric server-side mod that tracks players' online time and various activity statistics, displaying leaderboards in the sidebar and tab list. It supports multiple ranking modes and provides OP commands for data management.
Features
- 📊 Online time tracking – Records each player's total online time in ticks (20 ticks = 1 second)
- 🏆 Multiple leaderboards – Switch between:
- Time (
/playtime switch time) - Deaths (
/playtime switch death) - Blocks placed (
/playtime switch block) - Blocks broken (
/playtime switch dig) - Fish caught (
/playtime switch fish)
- Time (
- 📋 Tab list display – Shows each player's rank and formatted time in the player list (Tab key)
- 🤖 Bot exclusion – Players whose names start with "bot" (case‑insensitive) are excluded from all rankings
- ⚙️ Admin commands (OP only):
/playtime del <player>– Delete a player's data/playtime reload– Reload the data file
- 🎨 Coloured formatting – Uses Minecraft
§colour codes; top ranks have special colours - 💾 Auto‑save – Data is saved every 60 seconds (1200 ticks) and on server shutdown
- 🔌 Permissions API support – Integrates with Fabric Permissions API for fine‑grained control (e.g., LuckPerms)
- 🖥️ Sidebar toggle – Players can hide/show their own sidebar with
/playtime on//playtime off - 🌐 Server‑side only – No client installation required
Commands & Permissions
| Command | Description | Permission Node | Default OP Level |
|---|---|---|---|
/playtime |
View leaderboard and personal stats | none (everyone) | – |
/playtime help |
Show help | none | – |
/playtime switch <time|death|block|dig|fish> |
Switch sidebar mode | none | – |
/playtime on |
Show sidebar | none | – |
/playtime off |
Hide sidebar | none | – |
/playtime del <player> |
Delete a player's data | playtime.delete |
2 |
/playtime reload |
Reload data file | playtime.reload |
2 |
Note: If no permission management mod (e.g., LuckPerms) is installed, the mod falls back to vanilla OP level checks (
level 2= regular OP).
The console always has full permission.
Configuration File
- Path:
config/playtimeboard/playtime.json - Format: JSON, keyed by player UUID, storing name, play ticks, deaths, blocks placed, blocks broken, fish caught, current mode, online status, and sidebar visibility.
Example:
{
"00000000-0000-0000-0000-000000000001": {
"name": "Steve",
"playTicks": 72000,
"deaths": 5,
"blocksPlaced": 120,
"blocksBroken": 340,
"fishCount": 8,
"mode": "time",
"online": false,
"sidebarVisible": true
}
}
playTicksdivided by 20 gives seconds, by 1200 gives minutes, by 72000 gives hours.
Dependencies
- Minecraft:
26.1.2 - Fabric Loader:
>=0.19.0 - Fabric API:
0.150.0+26.1.2 - SimpleFabricScoreboard:
1.1.1(shaded) - Fabric Permissions API (optional):
0.3.3– for permission nodes
Installation
- Ensure your server has Fabric Loader and Fabric API installed (matching the versions above).
- Place the mod JAR (
PlayTimeBoard-5.20.0.jar) into your server'smodsfolder. - Start the server – the config file will be created automatically at
config/playtimeboard/playtime.json. - (Optional) Install a permission management mod like LuckPerms to use the permission nodes.
- Join the game and run
/playtimeas an OP to see the leaderboard.
Build from Source
git clone <repository-url>
cd PlayTimeBoard
./gradlew build
The resulting JAR will be located at build/libs/PlayTimeBoard-5.20.0.jar.
License
MIT License
中文
简介
PlayTimeBoard 是一个 Fabric 服务端模组,用于统计玩家的在线时长及多种活动数据,并在侧边栏和玩家列表中显示排行榜。支持多种排行模式,并提供 OP 管理命令。
功能特性
- 📊 在线时长统计 – 以游戏刻(20 刻 = 1 秒)为单位记录每位玩家的总在线时间
- 🏆 多模式排行榜 – 可通过命令切换:
- 在线时长榜(
/playtime switch time) - 死亡榜(
/playtime switch death) - 方块放置榜(
/playtime switch block) - 方块挖掘榜(
/playtime switch dig) - 钓鱼榜(
/playtime switch fish)
- 在线时长榜(
- 📋 Tab 列表显示 – 在玩家列表(按 Tab 键)中显示每位玩家的排名和格式化时长
- 🤖 排除机器人 – 名字以 "bot"(不区分大小写)开头的玩家不参与任何排行
- ⚙️ 管理命令(仅 OP):
/playtime del <玩家名>– 删除指定玩家的数据/playtime reload– 重新加载数据文件
- 🎨 彩色样式 – 支持 Minecraft
§颜色代码;前三名使用特殊颜色 - 💾 自动保存 – 每 60 秒(1200 刻)及服务器关闭时自动保存数据
- 🔌 权限 API 支持 – 集成 Fabric Permissions API,可配合 LuckPerms 等模组进行精细权限控制
- 🖥️ 侧边栏开关 – 玩家可通过
/playtime on//playtime off自行显示/隐藏侧边栏 - 🌐 纯服务端 – 无需客户端安装
命令与权限
| 命令 | 描述 | 权限节点 | 默认 OP 等级 |
|---|---|---|---|
/playtime |
查看排行榜及个人统计 | 无(所有人可用) | – |
/playtime help |
显示帮助 | 无 | – |
/playtime switch <time|death|block|dig|fish> |
切换侧边栏显示模式 | 无 | – |
/playtime on |
显示侧边栏 | 无 | – |
/playtime off |
隐藏侧边栏 | 无 | – |
/playtime del <玩家名> |
删除指定玩家的数据 | playtime.delete |
2 |
/playtime reload |
重新加载数据文件 | playtime.reload |
2 |
说明:如果未安装权限管理模组(如 LuckPerms),将自动回退到原版 OP 等级检查(
level 2即普通 OP)。
控制台执行命令始终拥有最高权限。
配置文件
- 位置:
config/playtimeboard/playtime.json - 格式:JSON,以玩家 UUID 为键,存储玩家名称、在线时长(刻)、死亡次数、放置方块数、挖掘方块数、钓鱼数、当前模式、在线状态及侧边栏可见性。
示例:
{
"00000000-0000-0000-0000-000000000001": {
"name": "Steve",
"playTicks": 72000,
"deaths": 5,
"blocksPlaced": 120,
"blocksBroken": 340,
"fishCount": 8,
"mode": "time",
"online": false,
"sidebarVisible": true
}
}
playTicks除以 20 得到秒数,除以 1200 得到分钟,除以 72000 得到小时。
依赖
- Minecraft:
26.1.2 - Fabric Loader:
>=0.19.0 - Fabric API:
0.150.0+26.1.2 - SimpleFabricScoreboard:
1.1.1(已内嵌) - Fabric Permissions API(可选):
0.3.3– 用于精细权限控制
安装
- 确保你的服务器已安装 Fabric Loader 和 Fabric API(版本与上述一致)。
- 将模组 JAR 文件(
PlayTimeBoard-5.20.0.jar)放入服务器的mods文件夹。 - 启动服务器 – 配置文件将自动生成于
config/playtimeboard/playtime.json。 - (可选)安装 LuckPerms 等权限管理模组,以使用权限节点。
- 进入游戏,OP 玩家可执行
/playtime查看排行榜。
从源码构建
git clone <repository-url>
cd PlayTimeBoard
./gradlew clean build
构建成功后,生成的 JAR 文件位于 build/libs/PlayTimeBoard-5.20.0.jar。
开源协议
MIT 许可证

