← 返回
开发者工具 Key 中文

minecraft-server-admin

Execute Minecraft Java Edition admin commands through the RCON remote console. Use for player moderation, whitelist management, item/state commands, world ru...
通过 RCON 远程控制台执行 Minecraft Java 版管理员命令,用于玩家管理、白名单管理、物品/状态命令及世界规则设置等。
en1r0py1865
开发者工具 clawhub v1.0.0 1 版本 99837.7 Key: 需要
★ 0
Stars
📥 615
下载
💾 15
安装
1
版本
#latest

概述

Minecraft Server Admin

Scope: This skill is your in-game remote control for a Minecraft Java server.

It sends commands through the RCON protocol to manage players, world state, and

server communication in real time. It intentionally excludes server-infrastructure

operations such as process lifecycle management, filesystem backups, plugin jar

installation, and continuous uptime monitoring; use a dedicated PaperMC ops skill

for those. This skill does NOT require minecraft-bridge — it communicates directly

with the server's admin console over a separate TCP connection.

Architecture:

OpenClaw → RCON TCP (port 25575) → Minecraft Server Console

Prerequisites

Enable RCON on the Server

Edit server.properties:

enable-rcon=true
rcon.port=25575
rcon.password=STRONG_PASSWORD_HERE
broadcast-rcon-to-ops=false

Restart server after changing these values.

Environment Variables

MC_RCON_HOST=localhost        # Server IP or hostname
MC_RCON_PORT=25575            # RCON port (must match server.properties)
MC_RCON_PASSWORD=yourpassword # RCON password (must match server.properties)
MC_SERVER_LOG=/path/to/server/logs/latest.log  # optional, for log analysis

Verify Connection

node ~/.openclaw/skills/minecraft-server-admin/scripts/rcon.js "list"
# Expected: "There are N of a max of M players online: ..."

Operation Categories

PLAYER MANAGEMENT

For any player-related command, use: scripts/rcon.js ""

Listing & Checking

  • "who is online" → /list → parse player count and names
  • "is [player] online" → /list then check if name appears

Access Control ⚠️ Requires confirmation before executing:

  • kick: /kick [reason]
  • temp ban: /ban [reason] + calendar note
  • permanent ban: /ban [reason]
  • ban IP: /ban-ip [reason]
  • unban: /pardon or /pardon-ip
  • whitelist add: /whitelist add
  • whitelist remove: /whitelist remove
  • op player: /op ⚠️ HIGH PRIVILEGE — always confirm
  • deop player: /deop

Item & State Management

  • give items: /give [count]
  • clear inventory: /clear [item] [count]
  • set gamemode: /gamemode
  • teleport: /tp or /tp
  • set health/hunger: /effect give minecraft:regeneration ...
  • heal player: /effect give minecraft:instant_health 1 10

WORLD MANAGEMENT

Time & Weather

  • day: /time set day
  • night: /time set midnight
  • sunrise: /time set 0
  • clear weather: /weather clear [seconds]
  • rain: /weather rain [seconds]
  • thunder: /weather thunder [seconds]

World State

  • save world: /save-all (always do before maintenance)
  • save-off (for backup): /save-off then backup then /save-on
  • change difficulty: /difficulty
  • set game rule: /gamerule
  • Examples: keepInventory true, doDaylightCycle false, doFireTick false
  • find structure: /locate structure minecraft:
  • fill area: /fill ⚠️ Confirm range before running

Entity Management

  • kill all mobs: /kill @e[type=!player] ⚠️ Confirm — kills all non-players
  • kill specific type: /kill @e[type=minecraft:zombie]
  • remove dropped items: /kill @e[type=minecraft:item]

BROADCAST & COMMUNICATION

  • server message: /say (prefixed with [Server])
  • title on screen: /title @a title {"text":"","color":"gold","bold":true}
  • subtitle: /title @a subtitle {"text":""}
  • private message: /msg
  • actionbar: /title @a actionbar {"text":""}

PERFORMANCE MONITORING

When asked about server performance:

  1. Execute /list → check player count
  2. Read MC_SERVER_LOG file (last 200 lines) if path set
  3. Look for patterns in references/log-patterns.md
  4. Report: TPS warnings, error frequency, player activity spikes

Safety Protocols

Confirmation required for all destructive/high-privilege commands:

⚠️  Dangerous Operation
Command: /ban SomePlayer griefing and harassment
Server:  ${MC_RCON_HOST}:${MC_RCON_PORT}
Effect:  Permanently bans SomePlayer from server

Type 'confirm' to proceed, or 'cancel' to abort.

Operations requiring confirmation:

  • ban, ban-ip — permanent account restriction
  • op — grants admin privileges
  • fill — large area modification
  • kill @e — entity mass-removal
  • stop — server shutdown
  • save-off — pauses auto-save (dangerous if forgotten)

Audit logging: After each operation, append to OpenClaw Memory:

## Server Admin Log [ISO timestamp]
- Command: /ban PlayerX "repeated griefing"
- Executed by: [OpenClaw user]
- Result: success

Response Formatting

Player List (/list response)

Parse and present as:

👥 Players Online (3/20):
  • Steve — [show coords if available]
  • Alex
  • Notch

Kicked/Banned confirmation

✅ Done: PlayerX has been banned
   Reason: griefing
   Effective immediately
   To undo: /pardon PlayerX

Error Responses

  • Connection refused → check RCON settings, server running?
  • Authentication failure → wrong MC_RCON_PASSWORD
  • Command returned empty → server may not have recognized command (check version)

Log Analysis

When user asks about server health or player history:

  1. Check MC_SERVER_LOG is set and file exists
  2. Read the last N lines: tail -500
  3. Apply patterns from references/log-patterns.md
  4. Summarize findings:
📊 Server Log Summary (last 2 hours)
  Player logins: 14
  Player logouts: 12 (2 still online)
  Errors/Warnings: 3
    - [15:42] Can't keep up! Running 2500ms behind
    - [16:10] Saving chunks for level 'world'
  Suspicious activity: none detected

Additional Resources

  • references/commands.md — All vanilla commands with syntax and permission level
  • references/log-patterns.md — Common log patterns and what they mean
  • scripts/rcon.js — RCON client (used by all commands above)
  • scripts/log-analyzer.js — Log parsing utilities

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 20:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,915
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,353
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,465