# Cool Nametag Addon for Minecraft Bedrock
A comprehensive nametag system for Minecraft Bedrock Edition that displays AFK status, health, XP, coordinates, and more!
## Features
### ๐ฏ AFK Detection
- Automatically detects when players are idle
- Configurable threshold (default: 60 seconds)
- Visual indicator with customizable tag text
- Instant removal when player moves
### โค๏ธ Health Display
- Shows current health above player names
- Option to display as hearts (โค) or percentage
- Color-coded for easy visibility
### โญ XP Level Display
- Shows player's current XP level
- Customizable color and format
### ๐ Coordinates Display (Optional)
- Show player coordinates in nametag
- Short format (X: 10 Y: 64 Z: -20) or full format with decimals
- Useful for multiplayer coordination
### ๐ Dimension Display (Optional)
- Shows which dimension the player is in
- Short names (Overworld, Nether, The End) or full IDs
### ๐ฎ Gamemode Display (Optional)
- Shows current gamemode
- Short format (S, C, A) or full names
### ๐ถ Ping Display (Optional)
- Simulated ping/latency indicator
- Note: Real ping data not available in Bedrock scripting API
## Performance Tips
1. **Update Interval**: Higher values (e.g., 20 ticks) reduce lag but update less frequently
2. **Disable Unused Features**: Turn off coordinates, dimension, etc. if not needed
3. **AFK Check Interval**: Increase this if you have many players
## Troubleshooting
### Script errors
- Ensure you're using Minecraft Bedrock 1.20.0 or higher
- Check the content log for specific errors
### Players not marked as AFK
- Check the `thresholdSeconds` setting
- Ensure `afk.enabled` is set to `true`
- Very small movements (like head rotation) don't count as movement
## Technical Details
- **Module**: `@minecraft/server` v1.9.0
- **Format Version**: 2
- **Min Engine**: 1.20.0
- **Update Method**: Scheduled intervals using `system.runInterval()`
## Edge Cases Handled
โ
Players joining/leaving - Data is properly initialized and cleaned up
โ
Dimension changes - Nametags update correctly
โ
Death/respawn - Nametag maintained through respawn
โ
Gamemode changes - Detected and updated
โ
Health changes - Updates in real-time
โ
Memory management - Stale player data cleaned every 5 minutes
## Credits
Created by AAAmiBotok for the Minecraft Bedrock community!
## License