DirtyLeaderboards
终极™排行榜插件。让你轻松创建现代化的排行榜。
? 工作原理
你所看到的一切都是由原版 BlockDisplay(方块显示实体)/TextDisplay(文本显示实体)构成的,插件会在每一刻对它们进行定位和动画处理。十个行项目带有滑入滑出的效果,并包含真实的玩家头像(<head:uuid>)以及物品/粒子图标(<sprite:atlas:path>)。
显示实体会循环展示你配置的多个排行榜,一次只显示一个,并在它们之间使用滑动动画过渡。你可以运行任意数量的独立显示实体,每个都可以拥有自己的位置和旋转角度。
⚠️ 重要须知
兼容性: 需要 Paper 1.21.9 或更高版本。行图标依赖于 1.21.9 中新增的原版 sprite(精灵)/head(头像)文本组件,因此本插件无法在 Spigot 或旧版本上运行(在那些版本上它们将显示为 ⬅ 一个空格)。
点击查看精灵列表及其路径。
✨ 特性
- ?️ 完全基于实体的显示
- ? 每个显示支持多个排行榜,按你控制的计时器轮换
- ? 三种数据源 - 原版 Bukkit 统计数据、自定义 Skript 语法和 PlaceholderAPI 占位符
- ? 自定义样式 - 颜色、图标(包括像游戏时长时钟这样的动画图标)、排名颜色、数字/时间格式均可针对每个排行榜进行自定义
- ? Skript 集成 - 提供效果、表达式、条件判断和一个轮换事件
- ? PlaceholderAPI 扩展
- ? Bukkit 事件 (
LeaderboardRotateEvent),供插件开发者使用
- ♻️ 热重载 -
/dlb reload 可在不重启服务器的情况下重新加载所有三个配置文件
- ?️ 多显示支持,每个显示可独立启动、停止、跳过或移动
?️ 排行榜数据源
leaderboards.yml 中的每个排行榜选择一个 source(数据源):
statistic - 直接从原版的 Bukkit 统计数据中提取(击杀数、死亡数、游戏时长等)。除非有其他插件干预,否则无法被修改。
custom - 最常通过我们自定义的 Skript 语法进行修改。
placeholder - 由 PlaceholderAPI 占位符修改。离线玩家会以每刻一小批的方式解析(在 config.yml 中的 placeholder-players-per-tick 配置项),以免在玩家众多的服务器上拖慢主线程。
?️ 命令
基础命令为 /dirtyleaderboards。
别名:dlb, leaderboards, dirtyboards, boards, db, dirtyboard, leaderboard, lb, dlbs。
如果你只配置了一个显示实体,可以省略 <display> 参数,它将默认指向你唯一的排行榜。
| 命令 |
描述 |
/dlb help |
列出以下命令 |
/dlb list |
列出所有显示实体及其运行状态 |
/dlb reload |
重新加载 config.yml、leaderboards.yml 和 messages.yml |
/dlb start <display> |
启动一个显示实体 |
/dlb stop <display> |
停止一个显示实体 |
/dlb skip <display> |
跳过到轮换中的下一个排行榜 |
/dlb move <display> |
将显示实体移动到你所站立且面对的位置 |
? 权限
| 权限 |
描述 |
默认值 |
dirtyleaderboards.admin |
访问所有 /dlb 子命令 |
OP (管理员) |
? Skript
如果检测到 Skript 已安装,Skript 插件会自动注册自身。
# 控制显示实体
start the leaderboard display "main"
stop the leaderboard display "main"
skip the leaderboard display "main"
# 检查状态
current leaderboard of display "main"
leaderboard display "main" is running
# 读取/写入“custom”数据源中单个玩家的分数
set leaderboard data of player in "points" to 100
add 5 to leaderboard data of player in "points"
remove 2 from leaderboard data of player in "points"
reset leaderboard data of player in "points"
# 清除所有玩家(不仅仅是你自己)在某个排行榜上的数据
clear the leaderboard data for leaderboard "points"
# 当任何显示实体轮换到新排行榜时触发反应
on leaderboard rotate:
broadcast "%rotated display id% just switched to %rotated leaderboard id%"
? PlaceholderAPI
一旦安装 PlaceholderAPI,便会注册为 %dirtyleaderboards_...%:
| 占位符 |
返回值 |
%dirtyleaderboards_top_<board>_<rank>_name% |
该排名的玩家名称 |
%dirtyleaderboards_top_<board>_<rank>_value% |
他们的数值,已格式化(例如 15.2k) |
%dirtyleaderboards_top_<board>_<rank>_raw% |
他们的数值,未格式化 |
%dirtyleaderboards_value_<board>% |
查看者玩家自己的数值,已格式化 |
%dirtyleaderboards_raw_<board>% |
查看者玩家自己的数值,未格式化 |
⚙️ 配置
config.yml - 全局设置:缓存、数字/时间格式,以及每个公告牌(billboard)的 displays: 条目(位置、旋转顺序、颜色、方块类型)。
leaderboards.yml - 排行榜本身:来源、标题、图标、格式化方式,以及 custom 类型排行榜的存储值。
messages.yml - 插件发送的所有消息。使用 MiniMessage。
单个排行榜条目的外观如下:
leaderboards:
kills:
enabled: true
source: statistic
statistic: player_kills
title: "TOP KILLS"
title-color: "#ee2a2a"
value-color: "#FFD263"
icon: "<sprite:items:item/diamond_sword>"
icon-width: 12
format: number
minimum-value: 1
duration-seconds: 15
? 许可证
本项目采用 CC BY-NC 4.0 许可证。
DirtyLeaderboards
The ultimate™ leaderboards plugin. Allows you to make modern leaderboards easily.
? How It Works
Everything you see is just vanilla BlockDisplay/TextDisplay entities, positioned and animated
by the plugin every tick. Ten rows that slide in and out with
real player heads (<head:uuid>) and item/particle icons (<sprite:atlas:path>).
Displays cycle through however many leaderboards you configure, one at a time, with slide
animations between them. You can run as many separate displays as you want, each with its own
location and its own rotation.
⚠️ Important Notice
Compatibility: Requires Paper 1.21.9 or newer. The row
icons rely on the vanilla sprite/head text components added in 1.21.9, so this won't work
on Spigot or older versions (They will show as ⬅ a space).
Click to view the list of sprites and their path.
✨ Features
- ?️ Fully entity-based displays
- ? Multiple leaderboards per display, rotating on a timer you control
- ? Three data sources - vanilla Bukkit statistics, a custom Skript syntax and PlaceholderAPI placeholder
- ? Custom styling - colors, icons (including animated ones, like the playtime clock), rank colors, number/time formatting are customizable for each leaderboard
- ? Skript integration - effects, expressions, a condition and a rotate event
- ? PlaceholderAPI expansion
- ? A Bukkit event (
LeaderboardRotateEvent) for plugin developers
- ♻️ Live reload -
/dlb reload reloads all three config files without a restart
- ?️ Multiple displays, each independently started, stopped, skipped or moved
?️ Leaderboard Sources
Each leaderboard in leaderboards.yml picks one source:
statistic - pulls straight from a vanilla Bukkit statistic (kills, deaths, playtime, you
name it). Can't be manipulated without another plugin.
custom - Most commonly changed by our custom skript syntax.
placeholder - modified by PlaceholderAPI placeholders. Offline players are resolved in
small batches per tick (placeholder-players-per-tick in config.yml) so it doesn't slow down the
main thread on servers with lots of players.
?️ Commands
Base command is /dirtyleaderboards.
Aliases: dlb, leaderboards, dirtyboards, boards, db, dirtyboard, leaderboard, lb, dlbs.
If you only have one display configured, you can leave <display> empty and it'll default to your only leaderboard.
| Command |
Description |
/dlb help |
Lists the commands below |
/dlb list |
Lists every display and whether it's running |
/dlb reload |
Reloads config.yml, leaderboards.yml and messages.yml |
/dlb start <display> |
Starts a display |
/dlb stop <display> |
Stops a display |
/dlb skip <display> |
Skips to the next leaderboard in the rotation |
/dlb move <display> |
Moves a display to where you're standing and facing |
? Permission
| Permission |
Description |
Default |
dirtyleaderboards.admin |
Access to every /dlb subcommand |
OP |
? Skript
The Skript addon registers itself automatically if Skript is present.
# control a display
start the leaderboard display "main"
stop the leaderboard display "main"
skip the leaderboard display "main"
# check state
current leaderboard of display "main"
leaderboard display "main" is running
# read/write a single player's score on a "custom" source board
set leaderboard data of player in "points" to 100
add 5 to leaderboard data of player in "points"
remove 2 from leaderboard data of player in "points"
reset leaderboard data of player in "points"
# wipe an entire board for every player (not just yours)
clear the leaderboard data for leaderboard "points"
# react whenever any display rotates to a new leaderboard
on leaderboard rotate:
broadcast "%rotated display id% just switched to %rotated leaderboard id%"
? PlaceholderAPI
Registers as %dirtyleaderboards_...% once PlaceholderAPI is installed:
| Placeholder |
Returns |
%dirtyleaderboards_top_<board>_<rank>_name% |
Name of the player at that rank |
%dirtyleaderboards_top_<board>_<rank>_value% |
Their value, formatted (e.g. 15.2k) |
%dirtyleaderboards_top_<board>_<rank>_raw% |
Their value, unformatted |
%dirtyleaderboards_value_<board>% |
The viewing player's own value, formatted |
%dirtyleaderboards_raw_<board>% |
The viewing player's own value, unformatted |
⚙️ Configuration
config.yml - global settings: caching, number/time formatting, and one displays: entry
per billboard (location, rotation order, colors, block types).
leaderboards.yml - the leaderboards themselves: source, title, icon, formatting, and
stored values for custom boards.
messages.yml - every message the plugin sends. Uses MiniMessage.
A single leaderboard entry looks like this:
leaderboards:
kills:
enabled: true
source: statistic
statistic: player_kills
title: "TOP KILLS"
title-color: "#ee2a2a"
value-color: "#FFD263"
icon: "<sprite:items:item/diamond_sword>"
icon-width: 12
format: number
minimum-value: 1
duration-seconds: 15
? License
This project uses the CC BY-NC 4.0 license.
评论 0
登录后参与评分
还没有评论,来抢沙发吧