94 lines
2.4 KiB
Markdown
94 lines
2.4 KiB
Markdown
# Minecraft Monitor Skill
|
|
|
|
Monitor Minecraft server status with basic checks — online/offline, player counts, server version, latency, and MOTD.
|
|
|
|
## Features
|
|
|
|
- ✅ Server online/offline status
|
|
- ✅ Player count (current/maximum)
|
|
- ✅ Online player list
|
|
- ✅ Server response latency
|
|
- ✅ Minecraft version info
|
|
- ✅ Server MOTD (message of the day)
|
|
- ✅ No external dependencies required
|
|
|
|
## Installation
|
|
|
|
Clone or download this skill to your OpenClaw workspace:
|
|
|
|
```bash
|
|
cd ~/.openclaw/workspace/skills/public
|
|
git clone http://git.theta42.com/nova/minecraft-monitor-skill.git minecraft-monitor
|
|
```
|
|
|
|
## Usage
|
|
|
|
Check the status of a Minecraft server:
|
|
|
|
```bash
|
|
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py <host[:port]> [timeout]
|
|
```
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# Check default port (25565)
|
|
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py corejourney.org
|
|
|
|
# Check custom port
|
|
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py mc.example.com:25566
|
|
|
|
# Check IP address with custom timeout
|
|
python3 ~/.openclaw/workspace/skills/public/minecraft-monitor/scripts/minecraft-status.py 192.168.1.142 10
|
|
```
|
|
|
|
### Output
|
|
|
|
**Server online:**
|
|
```
|
|
🟢 corejourney.org:25565 - ONLINE (45ms)
|
|
Version: Paper 1.21.11
|
|
Players: 3/64
|
|
Online: Steve, Alex, CreeperHunter
|
|
MOTD: Welcome to Core Journey!
|
|
```
|
|
|
|
**Server offline:**
|
|
```
|
|
🔴 corejourney.org:25565 - OFFLINE
|
|
Error: Connection timed out
|
|
```
|
|
|
|
## How It Works
|
|
|
|
Uses the Minecraft Server List Ping (SLP) protocol — no plugins or RCON access required. The script:
|
|
1. Opens a TCP connection to the server
|
|
2. Sends a handshake packet with protocol version 765 (1.19.3+)
|
|
3. Sends a status request
|
|
4. Parses the JSON response with server info
|
|
|
|
## Integration Ideas
|
|
|
|
- **Cron monitoring**: Run periodically and alert if server goes offline
|
|
- **Dashboard**: Display server status on a monitoring panel
|
|
- **Health checks**: Verify server availability before automated backups
|
|
- **Player notifications**: Track when players join/leave
|
|
|
|
## Notes
|
|
|
|
- Default port: `25565`
|
|
- Default timeout: `5` seconds
|
|
- Exit code: `0` if online, `1` if offline (useful for scripting)
|
|
- Some servers require the correct hostname in the handshake (not just IP address)
|
|
|
|
## License
|
|
|
|
MIT
|
|
|
|
## Author
|
|
|
|
Created for OpenClaw - AgentSkills ecosystem
|
|
|
|
## Repository
|
|
|
|
http://git.theta42.com/nova/minecraft-monitor-skill |