TabPlayerHider
隐藏选定的玩家,使其从标签页列表中消失,同时他们在世界中仍然完全存在。专为运行机器人的服务器设计:hidden-players 中列出的名称会从标签页列表中消失,但保留其姓名标签、皮肤、碰撞箱和行为。
该插件仅使用 Paper API(Player#unlistPlayer 和 Player#listPlayer)。无需 NMS、数据包或其他插件支持。
功能特性
- 隐藏的玩家对所有其他玩家不可见,无论是加入时还是通过命令即时生效,无需重新登录
- 隐藏的名称存储在
config.yml 中,重启后依然保留
- 隐藏仅应用于标签页列表,因此实体可见性、姓名标签、皮肤和计分板不受影响
- 重新连接的机器人会自动再次被隐藏,包括之前已经看到过它们的观察者
- 全局开关
/tph on 和 /tph off,每个子命令拥有独立的权限节点
- 标签补全:
/tph hide 建议在线玩家,/tph show 建议当前隐藏的名称
- 语言支持:en, de, ru, es, fr, ja, zh
配置
# 消息语言:en, de, ru, es, fr, ja, zh
language: en
# 主开关。也可通过 /tph on 和 /tph off 更改。
global-enabled: true
# 此处列出的玩家将对所有其他玩家的标签页列表隐藏。
# 名称区分大小写,必须与确切的 Minecraft 用户名匹配。
hidden-players:
- "BotName1"
- "BotName2"
语言文件会在首次启动时复制到 plugins/TabPlayerHider/lang/ 目录,并且可以编辑。所有消息均使用 MiniMessage 格式。
权限
| 权限 |
描述 |
默认值 |
tabplayerhider.admin |
授予以下所有权限 |
op |
tabplayerhider.use |
使用 /tph 并查看命令帮助 |
op |
tabplayerhider.toggle |
使用 /tph on 和 /tph off |
op |
tabplayerhider.status |
使用 /tph status |
op |
tabplayerhider.reload |
使用 /tph reload |
op |
tabplayerhider.hide |
使用 /tph hide |
op |
tabplayerhider.show |
使用 /tph show |
op |
tabplayerhider.list |
使用 /tph list |
op |
LuckPerms 示例:
/lp group admin permission set tabplayerhider.admin true
/lp user Steve permission set tabplayerhider.list true
每个子命令还需要 tabplayerhider.use 权限。
命令
| 命令 |
描述 |
/tph on |
启用隐藏,隐藏的玩家将从标签页列表中消失 |
/tph off |
禁用隐藏,所有玩家将再次显示在列表中 |
/tph status |
显示状态、隐藏玩家数量、在线人数以及使用的语言 |
/tph reload |
重新加载 config.yml 和语言文件,并重新应用隐藏设置 |
/tph hide <player> |
从标签页列表中隐藏一名玩家,并将名称保存到配置中 |
/tph show <player> |
在标签页列表中重新列出一名玩家,并从配置中移除该名称 |
/tph list |
列出所有隐藏的名称 |
主命令:/tabplayerhide,别名:/tph
要求
|
|
| 服务端 |
Paper 26.1 至 26.3 需配合 TabPlayerHider_1.1_26.x.jar,Paper 1.21 至 1.21.11 需配合 TabPlayerHider_1.1_1.21.x.jar(Purpur 和 Pufferfish 作为 Paper 的分支应该也能正常工作) |
| Java |
Paper 26.x 需要 Java 25+,Paper 1.21.x 需要 Java 21+ |
不支持 Spigot 和 Folia。安装方法:将与你的服务端匹配的 JAR 文件(_26.x 对应 Paper 26.x,_1.21.x 对应 Paper 1.21.x)复制到 plugins/ 文件夹中,然后启动服务器。
工作原理
对于每个观察者和每个隐藏的在线玩家,插件调用 Player#unlistPlayer,发送一个带有 UPDATE_LISTED 操作设置为 false 的 ClientboundPlayerInfoUpdatePacket。玩家并未从玩家注册表中移除,因此皮肤、姓名标签和实体追踪保持完整。
Paper 为每个观察者单独存储未列出状态,并在目标断开连接时不清除它。因此,如果机器人重新连接,单纯的 unlistPlayer 调用会跳过它。插件在同一刻内调用 listPlayer 和 unlistPlayer,这样客户端永远不会渲染已列出的状态。
在玩家加入时,插件等待一个刻(tick),因为服务器在加入事件发生后立即向加入客户端发送完整的玩家列表。经过这一个刻后,加入者会将所有隐藏的玩家标记为未列出;如果加入者本身是隐藏的,则所有其他观察者也会将其标记为未列出。/tph off、/tph hide、/tph show 以及插件关闭时会使用 listPlayer 重新列出受影响的玩家。
TabPlayerHider
Hides selected players from the tab list while they stay fully present in the world. Made for servers that run bots: names listed in hidden-players disappear from the tab list, but keep their nametag, skin, collision and behaviour.
The plugin uses only the Paper API (Player#unlistPlayer and Player#listPlayer). It needs no NMS, no packets and no other plugin.
Features
- Hidden players are unlisted for every other player, on join and instantly via command, no relog required
- Hidden names are stored in
config.yml and survive restarts
- Hiding is only applied to the tab list, so entity visibility, nametags, skins and the scoreboard are untouched
- Rejoining bots are hidden again automatically, also for viewers who already saw them before
- Global switch with
/tph on and /tph off, one permission node per subcommand
- Tab completion:
/tph hide suggests online players, /tph show suggests currently hidden names
- Languages: en, de, ru, es, fr, ja, zh
Configuration
# Language of messages: en, de, ru, es, fr, ja, zh
language: en
# Master switch. Also changed by /tph on and /tph off.
global-enabled: true
# Players listed here are hidden from the tab list of all other players.
# Names are case-sensitive and must match the exact Minecraft username.
hidden-players:
- "BotName1"
- "BotName2"
Language files are copied to plugins/TabPlayerHider/lang/ on first start and can be edited. All messages use MiniMessage.
Permissions
| Permission |
Description |
Default |
tabplayerhider.admin |
Grants every permission below |
op |
tabplayerhider.use |
Use /tph and see the command help |
op |
tabplayerhider.toggle |
Use /tph on and /tph off |
op |
tabplayerhider.status |
Use /tph status |
op |
tabplayerhider.reload |
Use /tph reload |
op |
tabplayerhider.hide |
Use /tph hide |
op |
tabplayerhider.show |
Use /tph show |
op |
tabplayerhider.list |
Use /tph list |
op |
LuckPerms examples:
/lp group admin permission set tabplayerhider.admin true
/lp user Steve permission set tabplayerhider.list true
Every subcommand also needs tabplayerhider.use.
Commands
| Command |
Description |
/tph on |
Enable hiding, hidden players disappear from the tab list |
/tph off |
Disable hiding, all players are listed again |
/tph status |
Show state, hidden player count, how many are online and the language |
/tph reload |
Reload config.yml and the language files and re-apply hiding |
/tph hide <player> |
Hide a player from the tab list and save the name to the config |
/tph show <player> |
List a player in the tab list again and remove the name from the config |
/tph list |
List all hidden names |
Main command: /tabplayerhide, alias: /tph
Requirements
|
|
| Server |
Paper 26.1 to 26.3 with TabPlayerHider_1.1_26.x.jar, Paper 1.21 to 1.21.11 with TabPlayerHider_1.1_1.21.x.jar (Purpur and Pufferfish should work as Paper forks) |
| Java |
25+ for Paper 26.x, 21+ for Paper 1.21.x |
Spigot and Folia are not supported. To install, copy the JAR that matches your server (_26.x for Paper 26.x, _1.21.x for Paper 1.21.x) into the plugins/ folder and start the server.
How it works
For every viewer and every hidden online player the plugin calls Player#unlistPlayer, which sends a ClientboundPlayerInfoUpdatePacket with the UPDATE_LISTED action set to false. The player is not removed from the player registry, so skin, nametag and entity tracking stay intact.
Paper stores the unlisted state per viewer and never clears it when the target quits. A bot that rejoins would therefore be skipped by a plain unlistPlayer call. The plugin calls listPlayer and unlistPlayer in the same tick, so the client never renders the listed state.
On join the plugin waits one tick, because the server sends the full player list to the joining client right after the join event. After that tick the joiner gets every hidden player unlisted, and if the joiner is itself hidden, all other viewers get it unlisted. /tph off, /tph hide, /tph show and plugin shutdown relist the affected players with listPlayer.
评论 0
登录后参与评分
还没有评论,来抢沙发吧