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。
侧边栏分页
侧边栏设计可以依次显示多个页面。每个页面替换相应的行,并可以设置自己的标题和编号。page-interval(以刻为单位)决定每个页面的停留时间。
lobby:
title: "&6&lMyServer"
page-interval: 200
pages:
- lines: ["", "&7Rank: %lucktab_rank%", "&7Online: &f%server_online%", ""]
- title: "&b&lStats"
lines: ["", "&7Ping: %lucktab_ping_colored%", "&7TPS: %lucktab_tps_colored%", ""]
在 Folia 上,如果安装了 ProtocolLib,侧边栏会通过数据包发送,使用相同的设计、分页以及 /sidebar 切换命令。在 Folia 上,名称标签及名称下方的文本处于禁用状态。
更新
配置中的 auto-update: true 会将新版本下载至更新文件夹,并在下次重启时应用。默认情况下此功能处于关闭状态。发布版构建仅跟随正式版本更新。
命令
| 命令 | 描述 | 权限 |
|---|---|---|
/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 icons |
列出可用的图标 | lucktab.icons |
/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 中的组元数据,仅排序顺序和名称颜色保留在配置中。两个 migrate 命令可以在两者之间迁移数据,因此切换来源不需要重新输入所有内容。
header-footer 和 scoreboard 各自包含一个 designs 部分。以世界命名的部分仅在该世界中生效,其他情况则回退到 default。设计也可以通过权限来选择自身,这是员工板与玩家板并存时所需的功能,或者通过 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 |
| Hex 色码 | &#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 以上为黄色,以下为红色 |
%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. Sidebars can have pages.
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.
Sidebar pages
A sidebar design can show several pages one after the other. Each page replaces the lines and
may set its own title and numbers, page-interval (in ticks) decides how long a page stays.
lobby:
title: "&6&lMyServer"
page-interval: 200
pages:
- lines: ["", "&7Rank: %lucktab_rank%", "&7Online: &f%server_online%", ""]
- title: "&b&lStats"
lines: ["", "&7Ping: %lucktab_ping_colored%", "&7TPS: %lucktab_tps_colored%", ""]
On Folia the sidebar is sent as packets when ProtocolLib is installed, with the same designs,
pages and the /sidebar toggle. Name tags and below-name stay off on Folia.
Updates
auto-update: true in the config downloads a newer version into the update folder, it is
applied at the next restart. It is off by default. A release build only follows releases.
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 icons |
List the available icons | lucktab.icons |
/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 (:name: works too in LuckTAB lines and prefixes) |
%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 元/月 即可畅快联机
LuckTAB 在 Modrinth 上的下载量突破了 3,000 次,感谢大家。本次发布以此命名。
新增
- 侧边栏分页功能。设计可以列出
pages(页面),每个页面拥有独立的行、可选的标题和编号,并通过page-interval(刻)决定每个页面的停留时长。请参阅配置文件中的示例。 - Folia 上的侧边栏支持。安装 ProtocolLib 后,它将以数据包形式发送,支持相同的设计、分页、条件行以及
/sidebar切换命令。在 Folia 上,姓名标签及名称下方的内容将保持隐藏。 /lucktab icons命令列出所有图标及其符号(权限:lucktab.icons)。%lucktab_icon_<name>%现已成为 PlaceholderAPI 扩展的一部分,其他插件也可使用它。- 如果前缀包含未定义图标的
:name:,系统将记录一次警告。 tab-list.show-only-same-world已生效:处于不同世界的玩家将从选项卡列表中隐藏。- 配置文件中新增
auto-update(默认关闭):自动下载更新版本至更新文件夹,并在下次重启时应用。正式版构建仅跟随正式版本,测试版构建则同时跟随正式版本和测试版本。
变更
/lucktab migrate from-luckperms命令会按 LuckPerms 权重对组进行排序,权重高的排在前面。- 当配置文件中不包含渐变效果且没有
%anim_...%占位符时,显示刷新间隔改为每 10 刻而非每 2 刻,这在大型服务器上能显著降低性能开销。 config.yml现在通过 updater-api 的 VersionedUpgrader 进行升级。它仅添加实际新版本带来的更改,因此你删除的选项将保持删除状态。旧的config-version标记变为version。- 重载时,排名列表会整体替换,确保聊天线程永远不会读取到半构建状态的列表。
修复
- 在 Spigot 上,直接写入
chatFormat的渐变效果显示为纯文本的问题已修复。
已在以下环境测试:Spigot 1.21.11(世界过滤、从所有旧版本升级配置、分页、渐变聊天、/lucktab icons)、Folia 1.21.11(配合 ProtocolLib 5.4.0,用于数据包侧边栏和分页)以及 Paper 26.3(配合 ViaVersion)。未测试项目:数据包侧边栏中的 Bedrock 玩家,以及 ItemsAdder 和 Oraxen 挂钩。
新增
- 图标。在任何一行、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
登录后参与评分
还没有评论,来抢沙发吧