[⚠️]注意! 如果您在使用该插件时遇到任何问题,请前往我们的 Discord 频道反馈!
TabPing 插件描述 ?
主要功能:
该插件会在标签页列表(按下 Tab 键时)中玩家昵称旁显示毫秒数(ms)形式的延迟信息 ⚡。此外,它还会监控玩家活动状态,并将不活跃的玩家标记为 AFK(挂机)?。
延迟系统工作原理:?
每秒更新一次 ⏱️:插件每 1 秒(20 Minecraft 刻)检查一次每位玩家在服务器上的延迟情况。
按速度进行颜色编码 ?:
- 绿色 ? < 50ms - 极优延迟
- 黄色 ? 50-100ms - 良好延迟
- 橙色 (GOLD) ? 100-150ms - 中等延迟
- 红色 ? > 150ms - 较差延迟
显示格式:PlayerName [45ms]
昵称为白色 ⚪
延迟数值带颜色 ?(取决于具体数值)
括号部分为深灰色
AFK 系统工作原理:?
活动追踪 ?:
插件会记录每位玩家最后一次移动的时间戳。
监听 PlayerMoveEvent 事件——当玩家移动时触发响应 ?
移动检测 ?:
插件会检查玩家是否真正发生了位移(X、Y、Z 坐标发生变化)。
仅旋转视角 ? 不会重置 AFK 计时器。
任何真实的移动 ? 都会重置计时器。
AFK 状态检查 ⏲️:
插件每秒检查所有玩家的状态。
如果玩家在 5 分钟 ⏰(300 秒)内未发生移动,则获得 AFK 状态。
格式示例:PlayerName [120ms] [AFK] ?
从 AFK 状态恢复 ✅:
当处于 AFK 状态的玩家发生移动时,立即移除 AFK 标记。
延迟数值会自动重新计算 ?
配置系统 (config.yml):⚙️
您可以自定义所有内容:
yamlafk:
time-seconds: 300 # 可修改为 60 = 1 分钟,600 = 10 分钟等 ⏱️
text: "AFK" # 可更改为 "AWAY" 或 "INACTIVE" ?
color: "GRAY" # AFK 文本的颜色 ?
ping:
thresholds:
good: 50 # 良好延迟阈值 ✅
medium: 100 # 中等延迟阈值 ⚠️
bad: 150 # 较差延迟阈值 ❌
colors:
good: "GREEN" # <50ms 对应的颜色 ?
medium: "YELLOW" # 50-100ms 对应的颜色 ?
bad: "GOLD" # 100-150ms 对应的颜色 ?
very-bad: "RED" # >150ms 对应的颜色 ?
命令列表:?:
- /tabping - 强制立即更新 + 在聊天栏中显示玩家信息 ?
- /tabping reload - 无需重启服务器即可重载 config.yml ♻️
- /tabping toggle - 临时禁用/启用插件 ?
插件如何处理 AuthSystem:?
当玩家加入服务器时,插件会等待 5 秒 ⏳ 后再设置延迟显示。
这为通过 AuthSystem ? 登录留出了时间。
登录完成后,延迟信息会自动显示 ✨
技术层面——后台发生了什么:?
内存 ?:插件使用 HashMap 存储以下数据:
lastActivity - 每位玩家的最后活动时间(UUID → 时间戳)
afkPlayers - 每位玩家的 AFK 状态(UUID → true/false)
事件监听 ?:
PlayerJoinEvent - 初始化玩家(重置 AFK 状态,设置活动时间)?
PlayerQuitEvent - 从内存中移除玩家 ?
PlayerMoveEvent - 更新活动时间 ?
定时器 ⏲️ (BukkitRunnable):
定时器 #1:每秒检查并标记 AFK 玩家 ?
定时器 #2:每秒更新所有玩家的延迟数据 ⚡
Adventure API ?:使用现代化的文本组件系统进行着色
示例场景:?
场景 1:正常玩家 ✅
玩家 "Invvl" 加入并登录 ? → 等待 5 秒 ⏳ → 显示 Invvl [35ms](绿色 ?)
玩家积极游戏 ?,延迟每秒更新。
场景 2:玩家离开电脑 ?
超过 5 分钟无移动 → Invvl [40ms] [AFK](AFK 部分显示为灰色)
返回并移动 ? → 立即变为 Invvl [42ms](AFK 标记消失 ✨)
场景 3:网络不佳 ?
延迟波动:80ms → Invvl [80ms](黄色 ?)
卡顿尖峰 ?:200ms → Invvl [200ms](红色 ?)
趋于稳定 ?:60ms → Invvl [60ms](黄色 ?)
该插件轻量级 ?(仅检查移动和延迟)、可配置 ⚙️(所有设置均在 config.yml 中)且全自动运行 ?(无需玩家手动操作)。
适用场景:?
✅ 生存服务器
✅ PvP 服务器(重要的延迟信息!)
✅ 小游戏服务器
✅ 需要管理 AFK 状态的社区服务器
享受您优化后的标签页列表吧! ?✨
[⚠️]NOTE! If u have aby issue with the plugin please report to in our discord!
TabPing Plugin Description ?
Main Function:
The plugin displays player ping ⚡ in milliseconds next to their nickname on the tab list (when you press Tab key). Additionally, it monitors player activity and marks inactive players as AFK ?.
How the ping system works: ?
Updates every second ⏱️: The plugin checks each player's ping on the server every 1 second (20 Minecraft ticks)
Color coding by speed ?:
- Green ? < 50ms - excellent ping
- Yellow ? 50-100ms - good ping
- Orange (GOLD) ? 100-150ms - medium ping
- Red ? > 150ms - poor ping
Display format: PlayerName [45ms]
Nickname is white ⚪
Ping is colored ? (depends on value)
Brackets are dark gray
How the AFK system works: ?
Activity tracking ?:
Plugin saves timestamp of each player's last movement
Listens to PlayerMoveEvent - reacts when player moves ?
Movement detection ?:
Plugin checks if player actually moved (X, Y, Z coordinate change)
Just rotating camera ? does NOT reset AFK timer
Every real movement ? resets the timer
AFK checking ⏲️:
Every second the plugin checks all players
If player hasn't moved for 5 minutes ⏰ (300 seconds) - gets AFK status
Format: PlayerName [120ms] [AFK] ?
Returning from AFK ✅:
When AFK player moves - immediately loses AFK marker
Ping is automatically updated ?
Configuration system (config.yml): ⚙️
You can customize everything:
yamlafk:
time-seconds: 300 # Change to 60 = 1 minute, 600 = 10 minutes etc. ⏱️
text: "AFK" # Can change to "AWAY" or "INACTIVE" ?
color: "GRAY" # Color of AFK text ?
ping:
thresholds:
good: 50 # Good ping threshold ✅
medium: 100 # Medium ping threshold ⚠️
bad: 150 # Bad ping threshold ❌
colors:
good: "GREEN" # Color for <50ms ?
medium: "YELLOW" # Color for 50-100ms ?
bad: "GOLD" # Color for 100-150ms ?
very-bad: "RED" # Color for >150ms ?
Commands: ?:
- /tabping - Forces immediate update + shows player info in chat ?
- /tabping reload - Reloads config.yml without server restart ♻️
- /tabping toggle - Disables/enables plugin temporarily ?
How the plugin handles AuthSystem: ?
When player joins, plugin waits 5 seconds ⏳ before setting ping
This gives time to log in through AuthSystem ?
After logging in, ping appears automatically ✨
Technically - what happens behind the scenes: ?
Memory ?: Plugin stores in HashMaps:
lastActivity - last activity time of each ****player (UUID → timestamp)
afkPlayers - AFK status of each player (UUID → true/false)
Events ?:
PlayerJoinEvent - initializes player (resets AFK, sets activity time) ?
PlayerQuitEvent - removes player from memory ?
PlayerMoveEvent - updates activity time ?
Timers ⏲️ (BukkitRunnable):
Timer #1: Every second checks and marks AFK players ?
Timer #2: Every second updates ping for all players ⚡
Adventure API ?: Uses modern text component system for coloring
Example scenarios: ?
Scenario 1: Normal player ✅
Player "Invvl" joins, logs in ? → waits 5s ⏳ → displays Invvl [35ms] (green ?)
Player actively plays ?, ping updates every second
Scenario 2: Player leaves computer ?
After 5 minutes without movement → Invvl [40ms] [AFK] (AFK gray)
Returns, moves ? → immediately Invvl [42ms] (AFK disappears ✨)
Scenario 3: Bad internet ?
Ping jumps: 80ms → Invvl [80ms] (yellow ?)
Lagspike ?: 200ms → Invvl [200ms] (red ?)
Stabilizes ?: 60ms → Invvl [60ms] (yellow ?)
The plugin is lightweight ? (only checks movement and ping), configurable ⚙️ (everything in config.yml) and automatic ? (requires no player interaction).
Perfect for: ?
✅ Survival servers
✅ PvP servers (important ping info!)
✅ Minigame servers
✅ Community servers with AFK management
Enjoy your optimized tab list! ?✨
评论 0
登录后参与评分
还没有评论,来抢沙发吧