PlayerPing 模组
这是 HoneyBerries 制作的原始 PlayerPing 插件的服务端移植版,适用于模组化的 Minecraft 服务器。
Fabric 服务器需要 Fabric API。
? 1.2.0 更新内容
- 支持从 1.21.x 到 26.3 的版本。
- 更精确的延迟测量:服务端每秒自行测量每个连接的延迟,因此
/ping 现在还会显示 抖动(jitter) 和 丢包率。
- 标签页列表保留 队伍颜色和前缀,而不是替换玩家名称。
- 标签页列表改为每秒刷新一次,而非每秒 20 次,从而减轻繁忙服务器的负载。
- 新增
/ping list:一次性查看所有在线玩家的延迟,按从高到低排序(管理员专用,也支持在控制台使用)。
- 新增
/pingplayer reload:无需重启即可应用配置更改。如果配置文件存在错误,重载将被拒绝,当前设置保持不变。
- 新增 Placeholder API 支持,使全息图及其他相关模组能够显示玩家的延迟。
/ip 命令现在显示“IP(服务端视角)”,以便更清晰地说明。
✨ 功能特性
- ? 延迟检测 -
/ping 查看自身延迟,/ping <player> 及 /ping list 供管理员使用。
- ? 实测延迟 - 真实往返时间,包含抖动和丢包数据,而非 Minecraft 默认的平滑值。
- ? IP 查询 -
/ip 查看自身 IP,/ip <player> 供管理员查询其他玩家 IP。
- ? 标签页延迟显示 - 在标签页中显示延迟,并根据质量着色,兼容记分板队伍。
- ?️ 实时阈值管理 - 在游戏中通过
/pingplayer threshold ... 编辑延迟等级阈值。
- ? 占位符 -
%pingplayer:ping% 和 %pingplayer:quality%,供使用 Placeholder API 的模组调用。
- ?️ 调试与诊断工具 - 内置诊断功能,便于故障排查。
命令
| 命令 |
描述 |
权限要求 |
/ping |
获取自身延迟 |
所有玩家 |
/ping <player> |
检查其他玩家的延迟 |
管理员 |
/ping list |
列出所有在线玩家的延迟 |
管理员 |
/ip |
获取自身 IP |
所有玩家 |
/ip <player> |
获取其他玩家的 IP |
管理员 |
/pingplayer help |
显示管理员命令帮助 |
管理员 |
/pingplayer reload |
重新加载配置文件 |
管理员 |
/pingplayer debug |
开启或关闭完整调试模式 |
管理员 |
/pingplayer dump |
生成完整的诊断报告 |
管理员 |
/pingplayer threshold <excellent|good|fair|poor|terrible> |
显示某等级的当前阈值 |
管理员 |
/pingplayer threshold <tier> equal-or-more <value> |
设置该等级阈值为 >= 指定值 |
管理员 |
/pingplayer threshold <tier> equal-or-less <value> |
设置该等级阈值为 <= 指定值 |
管理员 |
/pingplayer threshold <tier> equal <value> |
设置该等级阈值为等于指定值 |
管理员 |
/pingplayer threshold <tier> <min> <max> |
设置该等级阈值为区间范围 |
管理员 |
管理员定义为:原版操作者(OP)、拥有 playerping.admin 权限的玩家,或 LuckPerms 组权重至少为 minLuckPermsWeight(默认 8)的玩家。
示例
/pingplayer threshold terrible equal-or-more 500
/pingplayer threshold fair 101 250
/pingplayer reload
⚙️ 配置文件
设置保存在 config/player-ping/config.json 中。你可以在游戏中修改延迟等级阈值,并在文件中编辑其他设置,然后运行 /pingplayer reload 生效。
showPingOnTab(默认 true):在标签页中显示延迟。
tabRefreshTicks(默认 20):标签页更新的频率(20 tick = 1 秒)。
accuratePing(默认 true):每秒向每个玩家发送一个小数据包以测量延迟。如果反作弊系统对此有异议,可设为 false,此时将改用 Minecraft 的默认延迟值。
minLuckPermsWeight(默认 8):被视为管理员所需的 LuckPerms 权重值。
? 占位符
安装 Placeholder API(可选),并搭配能显示占位符的模组,例如全息图模组:
| 占位符 |
示例输出 |
%pingplayer:ping% |
42 ms(根据等级着色) |
%pingplayer:quality% |
excellent(根据等级着色) |
全息图文本示例:Welcome %player:displayname%, your ping is %pingplayer:ping% 将显示为 Welcome Steve, your ping is 10 ms。
? 诊断信息
运行 /pingplayer dump 后,模组会在以下位置生成完整的诊断报告:
config/player-ping/crash_reports/
Fabric 文件命名格式:pingplayer_crash_MMddyyyy_fabric.txt
? 延迟质量指示器
- ? 绿色 - 优秀(50 ms 或更低)
- ? 黄色 - 良好(51 - 100 ms)
- ? 金色 - 一般(101 - 200 ms)
- ? 红色 - 较差(201 - 300 ms)
- ? 深红色 - 极差(301 ms 或更高)
(默认范围,可在游戏中配置。)
? 安装方法
- 下载与你的加载器和 Minecraft 版本匹配的
.jar 文件。
- 将其放入服务器的
/mods 文件夹中。
- 重启服务器。
? 兼容性
- Fabric:1.21.x 需要使用 Java 21,26.1 - 26.3 需要使用 Java 25。
- NeoForge:开发中(WIP)。
- 客户端/服务端:仅限服务端。
- Fabric 需要 Fabric API。Placeholder API 为可选。
PlayerPing Mod
A server-side port of the original PlayerPing plugin by HoneyBerries, for modded Minecraft servers.
For Fabric servers, Fabric API is required.
🆕 What's New in 1.2.0
- Supports versions from 1.21.x up to 26.3.
- More accurate ping: the server measures each connection itself once per second, so
/ping now also shows jitter and packet loss.
- The tab list keeps team colors and prefixes instead of replacing the player's name.
- The tab list now refreshes once per second instead of 20 times per second, which is lighter on busy servers.
- New
/ping list: see every online player's ping at once, highest first (admins, also works from the console).
- New
/pingplayer reload: apply config changes without restarting. If the file has a mistake, the reload is refused and your current settings stay.
- New Placeholder API support, so holograms and similar mods can show a player's ping.
/ip now says "IP (as seen by the server)" for better clarification.
✨ Features
- 🔍 Ping Check -
/ping for yourself, /ping <player> and /ping list for admins.
- 📡 Measured Ping - Real round-trip time with jitter and packet loss, instead of Minecraft's smoothed value.
- 🌐 IP Lookup -
/ip for your own IP, /ip <player> for admins.
- 📋 Tablist Ping Display - Ping shown in the tab list with quality colors, compatible with scoreboard teams.
- 🎛️ Live Threshold Management - Edit ping tiers in-game with
/pingplayer threshold ....
- 🧩 Placeholders -
%pingplayer:ping% and %pingplayer:quality% for mods that use Placeholder API.
- 🛠️ Debug + Dump Tools - Built-in diagnostics for troubleshooting.
Commands
| Command |
Description |
Permission |
/ping |
Get your own ping |
All players |
/ping <player> |
Check another player's ping |
Admins |
/ping list |
List every online player's ping |
Admins |
/ip |
Get your own IP |
All players |
/ip <player> |
Get another player's IP |
Admins |
/pingplayer help |
Show admin command help |
Admins |
/pingplayer reload |
Reload the config file |
Admins |
/pingplayer debug |
Toggle full debug mode on/off |
Admins |
/pingplayer dump |
Generate a full diagnostic report |
Admins |
/pingplayer threshold <excellent|good|fair|poor|terrible> |
Show current threshold for a tier |
Admins |
/pingplayer threshold <tier> equal-or-more <value> |
Set tier to >= value |
Admins |
/pingplayer threshold <tier> equal-or-less <value> |
Set tier to <= value |
Admins |
/pingplayer threshold <tier> equal <value> |
Set tier to exact value |
Admins |
/pingplayer threshold <tier> <min> <max> |
Set tier to a range |
Admins |
Admins are vanilla operators, players with the permission playerping.admin, or players whose LuckPerms group weight is at least minLuckPermsWeight (default 8).
Examples
/pingplayer threshold terrible equal-or-more 500
/pingplayer threshold fair 101 250
/pingplayer reload
⚙️ Config
Settings are saved in config/player-ping/config.json. Change the tiers in-game, and edit the other settings in the file followed by /pingplayer reload.
showPingOnTab (default true): show ping in the tab list.
tabRefreshTicks (default 20): how often the tab list updates (20 ticks = 1 second).
accuratePing (default true): measure ping with a small packet per player each second. Set to false if an anti-cheat objects; Minecraft's normal value is used instead.
minLuckPermsWeight (default 8): LuckPerms weight that counts as admin.
🧩 Placeholders
Install Placeholder API (optional) together with a mod that shows placeholders, such as a hologram mod:
| Placeholder |
Example output |
%pingplayer:ping% |
42 ms (colored by tier) |
%pingplayer:quality% |
excellent (colored by tier) |
Example hologram text: Welcome %player:displayname%, your ping is %pingplayer:ping% would show as Welcome Steve, your ping is 10 ms.
🧪 Diagnostics
When you run /pingplayer dump, the mod creates a full diagnostic report at:
config/player-ping/crash_reports/
Fabric file naming format: pingplayer_crash_MMddyyyy_fabric.txt
🎨 Ping Quality Indicators
- 🟢 Green - Excellent (50 ms or less)
- 🟡 Yellow - Good (51 - 100 ms)
- 🟠 Gold - Fair (101 - 200 ms)
- 🔴 Red - Poor (201 - 300 ms)
- 🟥 Dark Red - Terrible (301 ms or more)
(Default ranges, configurable in-game.)
💻 Installation
- Download the
.jar that matches your loader and Minecraft version.
- Place it in your server's
/mods folder.
- Restart the server.
🔖 Compatibility
- Fabric: 1.21.x use java 21, 26.1 - 26.3 use java 25.
- NeoForge: WIP.
- Side: server-side only.
- Requires Fabric API on Fabric. Placeholder API is optional.
评论 0
登录后参与评分
还没有评论,来抢沙发吧