Minecraft Server Management Protocol Legacy Support
为未提供 Mojang 原生实现的服务器软件添加 Minecraft Server Management Protocol 端点。
Minecraft Server Management Protocol 是 Minecraft 服务器的新一代管理 API。它通过 WebSocket 上的 JSON-RPC 暴露服务器信息和管理工作,不再依赖 server-list ping 或 RCON 等旧机制。此插件将该协议形态引入到较旧的服务器版本和代理环境中,以便外部工具能在混合基础设施中统一使用一种管理协议进行通信。
功能特性
- 面向 Minecraft Server Management Protocol 客户端的 WebSocket 端点。
- 兼容 Minecraft Wiki 文档中所述协议模型的 JSON-RPC 请求与响应处理。
- 通过
rpc.discover 实现服务发现,使客户端能够检查可用的方法。
- 支持服务器/代理状态查询,包括在线玩家列表和版本信息。
- 针对基于 Bukkit 的服务器的管理工作,包括玩家、白名单、封禁、操作员、部分服务器设置、游戏规则、保存、停止和系统消息。
- 针对 Velocity 和 BungeeCord 的代理管理工作,包括玩家、踢出、状态、停止和系统消息。
- 通过共享密钥进行身份验证,并针对 WebSocket 子协议身份验证提供浏览器来源检查。
- 可选的 TLS 支持,使用 PKCS12 密钥库。
参考:
平台状态
| 平台 |
状态 |
| Spigot / Paper |
主要支持的运行时。基于 Spigot 1.8.8 API 构建以确保遗留兼容性。 |
| Velocity |
代理运行时支持,包括服务发现、玩家管理、踢出、代理状态、代理停止、系统消息以及代理/玩家通知。 |
| BungeeCord |
代理运行时支持,包括服务发现、玩家管理、踢出、代理状态、代理停止、系统消息以及代理/玩家通知。 |
对于遗留的 SpaceChunks 用法,当您需要从旧版 Minecraft 获取实时服务器状态和在线玩家计数时,请在后端服务器上安装 Spigot/Paper 版本。
支持的方法
| 方法组 |
Spigot / Paper |
Velocity |
BungeeCord |
rpc.discover |
是 |
是 |
是 |
minecraft:players |
是 |
是 |
是 |
minecraft:players/kick |
是 |
是 |
是 |
minecraft:server/status |
是 |
是(代理状态) |
是(代理状态) |
minecraft:server/stop |
是 |
是(停止代理) |
是(停止代理) |
minecraft:server/system_message |
是 |
是(代理玩家) |
是(代理玩家) |
minecraft:server/save |
是 |
否 |
否 |
minecraft:allowlist/* |
是 |
否 |
否 |
minecraft:bans/* |
是 |
否 |
否 |
minecraft:ip_bans/* |
是 |
否 |
否 |
minecraft:operators/* |
是 |
否 |
否 |
minecraft:serversettings/* |
部分支持 |
否 |
否 |
minecraft:gamerules/* |
是 |
否 |
否 |
Spigot/Paper 的服务器设置仅限于通过 Spigot 1.8.8 API 提供的接口。已实现设置包括 autosave、difficulty、use_allowlist、player_idle_timeout、只读的 allow_flight、只读的 motd、spawn_protection_radius、game_mode 和只读的 view_distance。
支持的通知
| 通知组 |
Spigot / Paper |
Velocity |
BungeeCord |
minecraft:notification/server/started |
是 |
是 |
是 |
minecraft:notification/server/stopping |
是 |
是 |
是 |
minecraft:notification/server/status |
是 |
是 |
是 |
minecraft:notification/server/activity |
是 |
是 |
是 |
minecraft:notification/players/joined |
是 |
是 |
是 |
minecraft:notification/players/left |
是 |
是 |
是 |
minecraft:notification/server/saving |
是 |
否 |
否 |
minecraft:notification/server/saved |
是 |
否 |
否 |
minecraft:notification/allowlist/* |
仅限管理 API 变更 |
否 |
否 |
minecraft:notification/bans/* |
仅限管理 API 变更 |
否 |
否 |
minecraft:notification/ip_bans/* |
仅限管理 API 变更 |
否 |
否 |
minecraft:notification/operators/* |
仅限管理 API 变更 |
否 |
否 |
minecraft:notification/gamerules/* |
仅限管理 API 变更 |
否 |
否 |
配置
该服务默认禁用。仅在设置好密钥并确定监听位置后才启用它。
Spigot/Paper 使用 plugins/MinecraftServerManagementProtocolLegacySupport/config.yml:
management-server-enabled: true
management-server-host: localhost
management-server-port: 25585
management-server-secret: 'replaceWithExactly40AlphaNumericCharacters'
management-server-allowed-origins: ''
management-server-tls-enabled: false
management-server-tls-keystore: ''
management-server-tls-keystore-password: ''
Velocity 和 BungeeCord 会在插件数据文件夹中创建 management-server.properties,其设置名称相同。
设置项
management-server-enabled: 启动或禁用管理端点。
management-server-host: 绑定的接口。仅当本地工具或反向代理需要连接时使用 localhost。
management-server-port: WebSocket 服务器的端口。生产环境请使用固定端口。
management-server-secret: 必需的共享密钥。必须恰好为 40 个字母数字字符。
management-server-allowed-origins: 通过 Sec-WebSocket-Protocol 进行身份验证时允许的来源浏览器的逗号分隔列表。
management-server-tls-enabled: 启用 wss://。需要有效的密钥库。
management-server-tls-keystore: PKCS12 密钥库的路径。
management-server-tls-keystore-password: 密钥库密码。也可以通过 MINECRAFT_MANAGEMENT_TLS_KEYSTORE_PASSWORD 环境变量或 JVM 属性 management.tls.keystore.password 提供。
许可证
根据 Apache License, Version 2.0 授权。请参阅 LICENSE。
Minecraft Server Management Protocol Legacy Support
Adds a Minecraft Server Management Protocol endpoint to server software that does not provide Mojang's native implementation.
The Minecraft Server Management Protocol is the newer management API for Minecraft servers. It exposes server information and management actions through JSON-RPC over WebSocket, instead of relying on older mechanisms such as server-list ping or RCON. This plugin brings that protocol shape to older server versions and proxy environments so external tools can speak one management protocol across mixed infrastructure.
What it provides
- A WebSocket endpoint for Minecraft Server Management Protocol clients.
- JSON-RPC request and response handling compatible with the protocol model documented on the Minecraft Wiki.
- Discovery through
rpc.discover, so clients can inspect which methods are available.
- Server/proxy status support, including online player list and version information.
- Management operations for Bukkit-based servers, including players, allowlist, bans, operators, selected server settings, gamerules, save, stop, and system messages.
- Proxy management operations for Velocity and BungeeCord, including players, kick, status, stop, and system messages.
- Authentication by shared secret, with browser-origin checks for WebSocket subprotocol authentication.
- Optional TLS using a PKCS12 keystore.
Reference:
Platform Status
| Platform |
Status |
| Spigot / Paper |
Main supported runtime. Built against the Spigot 1.8.8 API for legacy compatibility. |
| Velocity |
Proxy runtime support for discovery, players, kick, proxy status, proxy stop, system messages, and proxy/player notifications. |
| BungeeCord |
Proxy runtime support for discovery, players, kick, proxy status, proxy stop, system messages, and proxy/player notifications. |
For legacy SpaceChunks usage, install the Spigot/Paper build on the backend server when you need live server status and online player counts from old Minecraft versions.
Supported Methods
| Method group |
Spigot / Paper |
Velocity |
BungeeCord |
rpc.discover |
yes |
yes |
yes |
minecraft:players |
yes |
yes |
yes |
minecraft:players/kick |
yes |
yes |
yes |
minecraft:server/status |
yes |
yes, proxy status |
yes, proxy status |
minecraft:server/stop |
yes |
yes, stops proxy |
yes, stops proxy |
minecraft:server/system_message |
yes |
yes, proxy players |
yes, proxy players |
minecraft:server/save |
yes |
no |
no |
minecraft:allowlist/* |
yes |
no |
no |
minecraft:bans/* |
yes |
no |
no |
minecraft:ip_bans/* |
yes |
no |
no |
minecraft:operators/* |
yes |
no |
no |
minecraft:serversettings/* |
partial |
no |
no |
minecraft:gamerules/* |
yes |
no |
no |
Spigot/Paper server settings are limited to APIs available through the Spigot 1.8.8 API. Implemented settings are autosave, difficulty, use_allowlist, player_idle_timeout, allow_flight read-only, motd read-only, spawn_protection_radius, game_mode, and view_distance read-only.
Supported Notifications
| Notification group |
Spigot / Paper |
Velocity |
BungeeCord |
minecraft:notification/server/started |
yes |
yes |
yes |
minecraft:notification/server/stopping |
yes |
yes |
yes |
minecraft:notification/server/status |
yes |
yes |
yes |
minecraft:notification/server/activity |
yes |
yes |
yes |
minecraft:notification/players/joined |
yes |
yes |
yes |
minecraft:notification/players/left |
yes |
yes |
yes |
minecraft:notification/server/saving |
yes |
no |
no |
minecraft:notification/server/saved |
yes |
no |
no |
minecraft:notification/allowlist/* |
management API changes only |
no |
no |
minecraft:notification/bans/* |
management API changes only |
no |
no |
minecraft:notification/ip_bans/* |
management API changes only |
no |
no |
minecraft:notification/operators/* |
management API changes only |
no |
no |
minecraft:notification/gamerules/* |
management API changes only |
no |
no |
Configuration
The service is disabled by default. Enable it only after setting a secret and deciding where it should listen.
Spigot/Paper uses plugins/MinecraftServerManagementProtocolLegacySupport/config.yml:
management-server-enabled: true
management-server-host: localhost
management-server-port: 25585
management-server-secret: 'replaceWithExactly40AlphaNumericCharacters'
management-server-allowed-origins: ''
management-server-tls-enabled: false
management-server-tls-keystore: ''
management-server-tls-keystore-password: ''
Velocity and BungeeCord create management-server.properties in the plugin data folder with the same setting names.
Settings
management-server-enabled: Starts or disables the management endpoint.
management-server-host: Interface to bind. Use localhost when only local tooling or a reverse proxy should connect.
management-server-port: Port for the WebSocket server. Use a fixed port for production.
management-server-secret: Required shared secret. It must be exactly 40 alphanumeric characters.
management-server-allowed-origins: Comma-separated list of allowed browser origins when authenticating through Sec-WebSocket-Protocol.
management-server-tls-enabled: Enables wss://. Requires a valid keystore.
management-server-tls-keystore: Path to a PKCS12 keystore.
management-server-tls-keystore-password: Keystore password. It can also be supplied through MINECRAFT_MANAGEMENT_TLS_KEYSTORE_PASSWORD or the JVM property management.tls.keystore.password.
License
Licensed under the Apache License, Version 2.0. See LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧