TabPlugin
TabPlugin displays player ping in milliseconds on the tab list with color-coding (green/yellow/orange/red) and automatically marks players as AFK after 5 minutes of inactivity.
📖About TabPlugin
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! 🚀✨