LuckTAB
选项卡列表、名称标签、侧边栏和聊天格式,均由玩家所在的 LuckPerms 组驱动。一个 config.yml 决定每个等级的外观,插件会将该前缀同时应用到各个位置:头顶上方、选项卡列表中、聊天消息前方以及侧边栏中。
颜色支持旧版代码、十六进制色值或自动流动的渐变动画。页眉、页脚和侧边栏可根据世界和权限进行区分;玩家可以关闭自己的侧边栏;内容为空的行会自动隐藏。通过 Geyser 加入的基岩版玩家会获得稳定的侧边栏,而不会出现闪烁现象。在页眉、页脚和行中可以使用 :star: 等图标,这些图标也可以直接来自你的资源包。
完整文档请参阅 wiki。
要求
- Minecraft 1.21+ 上的 Paper 或 Spigot
- Java 21
- LuckPerms(必需)
- PlaceholderAPI(可选)
- ProtocolLib(可选,仅用于选项卡列表中的静态信息行)
- EssentialsX、CMI 或 Purpur(可选,用于 AFK 标签)
- Geyser 或 Floodgate(可选,用于基岩版玩家)
在 Paper 上,侧边栏通过组件渲染,因此每一行都支持十六进制色值和渐变。在 Spigot 上,侧边栏回退到旧版颜色;其他功能完全相同。
基岩版与 Geyser
基岩版玩家通过 Floodgate 或 Geyser API 识别,无需额外配置。Geyser 会在每次收到更改时重建整个基岩版侧边栏,并且在每秒超过 20 个记分板数据包时会开始限流。因此,LuckTAB 仅发送实际发生变化的内容,并为基岩版玩家提供独立的、较慢的更新速率:
bedrock:
enabled: true
update-interval: 20
animations: false
fake-entries: false
当设置 animations: false 时,渐变色和 %anim_...% 对基岩版玩家而言将保持在第一帧。由于基岩版无法显示选项卡列表的页眉和页脚,因此不会向这些玩家发送相关内容。带有 platform: bedrock 的侧边栏或页眉/页脚设计仅针对基岩版玩家使用,这为更窄的基岩版侧边栏留出了更短行的空间。
图标
在任何 LuckTAB 行或 LuckPerms 的前缀/后缀中写入 :name:,它就会变成符号。在 LuckTAB 行内使用 %lucktab_icon_name% 也能实现相同效果。没有对应图标的名称保持原样。
icons:
star: "&e★"
crown: "&6♛"
# rank_owner: "\uE001" # 资源包字形
启用 icons-auto 后,LuckTAB 也会自动读取你资源包中的字形。图片名称即为图标名称,例如 rank_owner.png 变为 :rank_owner:。它使用 server.properties 中指定的资源包,或者你设置的 pack(URL、zip 文件或文件夹)。只有包含恰好一个字符的图片才有效。自定义 icons 部分中的图标优先级高于资源包中的图标。
安装 ItemsAdder 后,其字体图片可作为 :name: 使用;安装 Nexo 或 Oraxen 时,则使用其字形 ID。
命令
| 命令 | 描述 | 权限 |
|---|---|---|
/lucktab reload |
重载 config.yml 并重建所有显示 |
lucktab.reload |
/lucktab toggle, /sidebar, /sb |
显示或隐藏你自己的侧边栏,重连后仍保留状态 | lucktab.toggle |
/lucktab setprefix <group> <prefix> |
在游戏中修改等级前缀并重载 | lucktab.edit |
/lucktab setsuffix <group> <suffix> |
在游戏中修改等级后缀并重载 | lucktab.edit |
/lucktab benchmark |
查看各部分的更新耗时(微秒) | lucktab.benchmark |
/lucktab migrate to-luckperms |
将配置的前缀写入 LuckPerms 组 | lucktab.migrate |
/lucktab migrate from-luckperms |
将所有 LuckPerms 组的前缀读回配置文件 | lucktab.migrate |
所有权限默认授予 OP,除了 lucktab.toggle,所有玩家均拥有该权限。
setprefix 和 setsuffix 通过 Bukkit 保存 config.yml,这会丢失其中的注释。切换命令的别名是可配置的,并在启动时注册,因此更改它需要重启服务器而非重载。
配置
当新版本添加新选项时,它们会在下次启动时写入现有的 config.yml 中,并附带注释。您的原有值保持不变,旧文件会被保留为 config.yml.bak。
每个等级占一行,按照它们在标签页列表中应出现的顺序排列。最上面的是最高等级:
prefixes:
- "owner;<gradient:#FF0000:#FF7700>[Owner] </gradient>;;&#FF7700"
- "admin;&#FF5555[Admin] &7;;&#FF5555"
- "vip;&6[VIP] &7;;&6"
- "default;&7[Player] &7;;&7"
格式为 luckperms_group;prefix;suffix;namecolor。未列入任何组的玩家将获得最后一项的设置。
prefix-source 决定前缀的来源。设置为 lucktab 时,前缀从上述配置中读取;设置为 luckperms 时,前缀和后缀来自 LuckPerms 中的组元数据(group meta),仅排序顺序和名称颜色由配置决定。两个 migrate 命令用于在两者之间迁移数据,因此切换无需重新输入所有内容。
header-footer 和 scoreboard 各自包含一个 designs 部分。以世界命名的部分仅在该世界中生效,其他情况回退到 default。设计也可以通过权限选择自身,例如员工板(staff board)与玩家板(player board)并存时需要此功能,或通过 platform: bedrock / platform: java 进行选择:
scoreboard:
designs:
staff:
permission: lucktab.staff
priority: 10
title: "&c&lStaff"
lines:
- "&7TPS: &f%server_tps_1%"
如果某行的所有占位符均返回空值、0 或 null,则该行为被删除而不是留下空白间隙,因此对于没有加入战队的玩家,&7Clan: &f%clan_name% 将完全不存在。空的间隔行始终保留。
animations 包含命名帧列表,%anim_<name>% 可在允许占位符的任何位置打印当前帧。标题和页脚设计可以使用 frames 代替固定的单一区块,并在其中循环播放。
颜色
| 语法 | 示例 |
|---|---|
| 传统色 | &a, &l, &r |
| 十六进制色 | &#FF5555 |
| 渐变色 | <gradient:#FF0000:#FF7700>text</gradient> |
渐变色具有动画效果:每两刻钟颜色波浪会轻微偏移,从而使前缀在其范围内缓慢循环变化。
占位符
| 占位符 | 含义 |
|---|---|
%player% |
玩家名称 |
%world% |
当前世界 |
%server_online% |
在线玩家数量 |
%server_max_players% |
最大槽位数 |
%player_ping% |
延迟数值(纯数字) |
%lucktab_ping_colored% |
延迟,根据 ping-colors 中的阈值显示绿色/黄色/红色 |
%lucktab_rank% / %lucktab_prefix% |
等级前缀 |
%lucktab_suffix% |
等级后缀 |
%lucktab_color% |
等级的名称颜色 |
%lucktab_rank_display% |
前缀、颜色、组名和后缀组合在一起 |
%lucktab_ping_icon% |
来自 ping-icons 部分的延迟图标 |
%lucktab_icon_<name>% |
来自 icons 部分或资源包的图标,仅限在 LuckTAB 的行和前缀中使用(:name: 也可用) |
%lucktab_tps% |
服务器 TPS,保留一位小数(Paper 支持,Spigot 上显示 -) |
%lucktab_tps_colored% |
TPS,19 以上为绿色,15 以上为黄色,低于 15 为红色 |
%lucktab_mspt% |
每刻平均毫秒数(Paper 支持) |
%lucktab_afk% |
AFK 标记,玩家活跃时为空 |
%lucktab_badges% |
玩家所在所有组的徽章 |
%lucktab_platform% |
Geyser/Floodgate 玩家显示 Bedrock,否则显示 Java |
%anim_<name>% |
动画的当前帧 |
%chatPrefix% / %chatSuffix% / %chatBadges% / %playerName% / %message% |
仅限聊天格式使用 |
安装 PlaceholderAPI 后,其占位符也可在 LuckTAB 的所有文本中使用。作为回报,LuckTAB 注册了自己的扩展,以便其他插件可以读取 %lucktab_prefix%、%lucktab_rank_display%、%lucktab_badges% 等;追加 _plain 可获取无颜色的版本。这也是 DiscordSRV 获取等级信息用于其聊天桥接的方式:将该占位符放入 DiscordSRV 的消息格式中。
构建
mvn clean package
生成的 jar 包位于 target/LuckTAB-<version>.jar。bStats 已被阴影化并重定位至 de.empireblocks.luckTAB.metrics;paper-api、LuckPerms API 和 PlaceholderAPI 均为 provided 依赖,不会包含在 jar 包中。
许可证
GNU General Public License v3.0。详见 LICENSE。
LuckTAB
Tab list, name tags, sidebar and chat format, all driven by the LuckPerms group a
player is in. One config.yml decides what a rank looks like, and the plugin
applies that prefix everywhere at once: above the head, in the tab list, in front
of the chat message and in the sidebar.
Colors can be legacy codes, hex, or animated gradients that move on their own.
Header, footer and sidebar can differ per world and per permission, players can
switch their sidebar off, and lines that have nothing to say disappear on their own.
Bedrock players joining through Geyser get a sidebar that stays calm instead of flickering.
Icons like :star: work in prefixes and lines, also straight from your resource pack.
Full documentation is in the wiki.
Requirements
- Paper or Spigot on Minecraft 1.21+
- Java 21
- LuckPerms (required)
- PlaceholderAPI (optional)
- ProtocolLib (optional, only for the static info rows in the tab list)
- EssentialsX, CMI or Purpur (optional, for the AFK tag)
- Geyser or Floodgate (optional, for Bedrock players)
On Paper the sidebar renders through components, so hex and gradients work in every line. On Spigot the sidebar falls back to legacy colors; everything else is the same.
Bedrock and Geyser
Bedrock players are recognized through the Floodgate or Geyser API, nothing has to be set up. Geyser rebuilds the whole Bedrock sidebar on every change it receives and starts throttling above 20 scoreboard packets per second, so LuckTAB only sends what actually changed, and Bedrock players get their own, slower update rate:
bedrock:
enabled: true
update-interval: 20
animations: false
fake-entries: false
With animations: false gradients and %anim_...% stay on their first frame for them.
Bedrock cannot show a tab list header and footer, so those are not sent at all. A sidebar or
header/footer design with platform: bedrock is only used for Bedrock players, which leaves
room for shorter lines on the narrower Bedrock sidebar.
Icons
Write :name: in any LuckTAB line or in a LuckPerms prefix or suffix and it turns into a
symbol. %lucktab_icon_name% does the same inside LuckTAB lines. Names without an icon stay
as they are.
icons:
star: "&e★"
crown: "&6♛"
# rank_owner: "\uE001" # a resource pack glyph
With icons-auto LuckTAB also reads the glyphs of your resource pack on its own. The picture
name is the icon name, so rank_owner.png becomes :rank_owner:. It uses the pack from
server.properties, or the pack you set (URL, zip or folder). Only pictures with exactly
one character count. Icons from your own icons section win over the pack.
With ItemsAdder installed its font images work as :name:, with Nexo or Oraxen their glyph
ids.
Commands
| Command | Description | Permission |
|---|---|---|
/lucktab reload |
Reload config.yml and rebuild every display |
lucktab.reload |
/lucktab toggle, /sidebar, /sb |
Show or hide your own sidebar, remembered across rejoins | lucktab.toggle |
/lucktab setprefix <group> <prefix> |
Change a rank prefix in game and reload | lucktab.edit |
/lucktab setsuffix <group> <suffix> |
Change a rank suffix in game and reload | lucktab.edit |
/lucktab benchmark |
What the updates cost, in microseconds per section | lucktab.benchmark |
/lucktab migrate to-luckperms |
Write the configured prefixes into LuckPerms groups | lucktab.migrate |
/lucktab migrate from-luckperms |
Read the prefixes of all LuckPerms groups back into the config | lucktab.migrate |
All permissions default to op, except lucktab.toggle, which everyone has.
setprefix and setsuffix save config.yml through Bukkit, which drops the
comments in it. The alias of the toggle command is configurable and is registered
at startup, so changing it needs a restart rather than a reload.
Configuration
When a new version adds options, they are written into your existing config.yml on the next
start, with their comments. Your values stay as they are, and the previous file is kept as
config.yml.bak.
Ranks are one line each, in the order they should appear in the tab list. Top is highest:
prefixes:
- "owner;<gradient:#FF0000:#FF7700>[Owner] </gradient>;;&#FF7700"
- "admin;&#FF5555[Admin] &7;;&#FF5555"
- "vip;&6[VIP] &7;;&6"
- "default;&7[Player] &7;;&7"
The format is luckperms_group;prefix;suffix;namecolor. A player who is in none of
the listed groups gets the last entry.
prefix-source decides where prefixes come from. With lucktab they are read from
the config above, with luckperms the prefix and suffix come from the group meta in
LuckPerms and only the sort order and name color stay with the config. The two
migrate commands move the data between both sides, so switching does not mean
typing everything again.
header-footer and scoreboard each hold a designs section. A section named after
a world is used in that world, everything else falls back to default. A design can
also pick itself by permission, which is what a staff board next to a player board
needs, or by platform: bedrock / platform: java:
scoreboard:
designs:
staff:
permission: lucktab.staff
priority: 10
title: "&c&lStaff"
lines:
- "&7TPS: &f%server_tps_1%"
Lines whose placeholders all come back empty, 0 or null are dropped instead of
leaving a gap, so &7Clan: &f%clan_name% is simply not there for a player without a
clan. Empty spacer lines always stay.
animations holds named frame lists, and %anim_<name>% prints the current frame
anywhere a placeholder is allowed. A header and footer design can carry frames
instead of one fixed block and rotate through them.
Colors
| Syntax | Example |
|---|---|
| Legacy | &a, &l, &r |
| Hex | &#FF5555 |
| Gradient | <gradient:#FF0000:#FF7700>text</gradient> |
Gradients animate: the color wave shifts a little every two ticks, so a prefix slowly cycles through its range.
Placeholders
| Placeholder | Meaning |
|---|---|
%player% |
Player name |
%world% |
Current world |
%server_online% |
Online player count |
%server_max_players% |
Slot count |
%player_ping% |
Ping as a plain number |
%lucktab_ping_colored% |
Ping, green/yellow/red by the thresholds in ping-colors |
%lucktab_rank% / %lucktab_prefix% |
The rank prefix |
%lucktab_suffix% |
The rank suffix |
%lucktab_color% |
The name color of the rank |
%lucktab_rank_display% |
Prefix, color, group name and suffix in one |
%lucktab_ping_icon% |
Ping symbol from the ping-icons section |
%lucktab_icon_<name>% |
Icon from the icons section or the resource pack, only inside LuckTAB lines and prefixes (:name: works too) |
%lucktab_tps% |
Server TPS with one decimal (Paper, - on Spigot) |
%lucktab_tps_colored% |
TPS, green from 19, yellow from 15, red below |
%lucktab_mspt% |
Average milliseconds per tick (Paper) |
%lucktab_afk% |
The AFK tag, empty while the player is active |
%lucktab_badges% |
Badges for every group the player is in |
%lucktab_platform% |
Bedrock for Geyser/Floodgate players, otherwise Java |
%anim_<name>% |
Current frame of an animation |
%chatPrefix% / %chatSuffix% / %chatBadges% / %playerName% / %message% |
Chat format only |
With PlaceholderAPI installed, its placeholders work in every LuckTAB text as well.
LuckTAB registers its own expansion in return, so other plugins can read
%lucktab_prefix%, %lucktab_rank_display%, %lucktab_badges% and the rest; append
_plain for a version without colors. That is also how DiscordSRV picks up the ranks
for its chat bridge: put the placeholder into the DiscordSRV message format.
Building
mvn clean package
The finished jar lands in target/LuckTAB-<version>.jar. bStats is shaded and
relocated into de.empireblocks.luckTAB.metrics; paper-api, the LuckPerms API and
PlaceholderAPI are provided and stay out of the jar.
License
GNU General Public License v3.0. See LICENSE.
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LuckTAB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
新增
- 图标。在任何一行、LuckPerms 的前缀或后缀中写入
:name:,或使用%lucktab_icon_<name>%, 它将被转换为配置的符号。没有图标的名称保持原样。 - 在配置文件的新的
icons部分中添加自定义图标。它们可以是带有颜色代码的纯符号, 或者是资源包字形中的私有使用字符,例如"\uE001"。 - 来自资源包的自动图标(
icons-auto)。LuckTAB 从server.properties读取该资源包的字形,或者读取你设置的pack(URL、zip 文件或文件夹)。图片名称即为图标 名称,因此rank_owner.png变为:rank_owner:。仅计算恰好包含一个字符的图片。 - 安装了 ItemsAdder 后,其字体图像可作为
:name:使用;对于 Nexo 或 Oraxen,则使用它们的字形 ID。 - 配置升级程序会将新的
icons和icons-auto块添加到现有文件中。
已在 Paper 26.3(配合 ViaVersion 和 ViaBackwards,Java 机器人运行于 1.21.11)、Folia 1.21.11 和 Spigot 1.21.11 上测试。未测试:ItemsAdder、Nexo 和 Oraxen 挂钩功能以及从 URL 加载的资源包。
已修复
- 当设置
prefix-source: luckperms时,玩家头顶的名称标签仍会显示来自prefixes列表的前缀。由于名称标签团队仅从该列表构建,因此 LuckPerms 的前缀无法应用至此。现在,这些团队将基于在线玩家的 LuckPerms 返回的前缀进行构建。 - 当设置
prefix-source: luckperms时,若玩家的 LuckPerms 组未包含在prefixes列表中,则会获得该列表最后一条条目的前缀。现在,他们将正确获得其 LuckPerms 前缀;此时该列表仅用于决定颜色与排序顺序,且他们排在所列组别之后。 - 玩家刚加入服务器、等级尚未加载时,会短暂显示
prefixes列表中的最后一条条目。
已在 Paper 26.3(搭配 MariaDB 数据库的 LuckPerms)上测试。未在 Folia 或 Spigot 上测试。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
自定义你的Minecraft头像!
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
插件
一个高度兼容、功能完善且稳定的 TPA 模组
插件
在 Minecraft 中加入“最后一击”、“第二次机会”和“最后喘息”机制!从高处坠落时,你将拥有 0.5 HP 而不是直接死亡;当生命值较低时,增强你的能力。
插件
允许基岩版(Geyser)玩家使用自定义铁砧和锻造台配方。
评论 0
登录后参与评分
还没有评论,来抢沙发吧