monban 是一个白名单、访问控制和权限插件,支持明确的 ONLINE(在线)、OFFLINE(离线)和 FLOODGATE 玩家身份标识。它支持独立的 Bukkit/Spigot 以及 Paper/Folia 服务器,并可在带有 Geyser/Floodgate 支持的 Velocity 网络中充当中央访问权威,提供玩家分组、受限后端访问和同步的后端权限功能。
其重点不仅仅是“此 UUID 是否被允许?”,而是该身份为何可信。采用“故障关闭”(fail-closed)行为是刻意为之:无效的配置、未解析的网络拓扑、未验证的后端身份、必需提供者失败以及同步失败都不会导致静默的放行决定。
支持的平台
| 平台 |
部署方式 |
全局白名单 |
玩家权限 |
受限后端访问 |
混合认证 |
Floodgate 身份 |
| Bukkit / Spigot |
独立或后端 |
✓ |
✓ |
— |
— |
— |
| Paper / Folia |
独立或后端 |
✓ |
✓ |
— |
— |
— |
| Velocity |
网络权威 |
✓ |
✓ |
✓ |
✓ |
✓ |
Paper/Folia 构建包是一个 Paper 插件,与 Bukkit/Spigot 兼容构建包分开。混合认证流程的选择权属于 Velocity;Paper/Folia 插件不实现 deployment.mode: VELOCITY。
支持 Spigot、Paper、Purpur 及其他兼容 Bukkit/Paper 的分支版本。Spigot 和 Paper 已单独测试;其他分支版本具备 API 兼容性,但不提供单独的保证。不支持 Mohist、Arclight 和 Cardboard 等混合分支版本。
功能
- 使用明确的
ONLINE、OFFLINE 和 FLOODGATE 身份标识,而非通过 UUID 的存在来推断信任。
- 在 Velocity 上可选集成 Geyser/Floodgate,以支持经过认证的基岩版玩家。
- 玩家分组独立于 Velocity 的
SERVER_GROUP 定义。
- 为代理层和后端的插件提供基于分组和直接玩家的权限。
- 支持
NETWORK、SERVER_GROUP 和 SERVER 作用域用于访问规则和权限。
- 为单个后端服务器和服务器组提供分组访问授权。
- 在所有支持的平台间统一使用
/monban whitelist 管理模型。
- 运行时支持
/monban whitelist enable 和 /monban whitelist disable。
- 自动根据玩家名称查找 ONLINE 配置文件,同时仍保留显式 UUID 输入选项。
- 交互式白名单和受限访问列表,支持分页和保留过滤条件的导航。
- 在 Velocity 上实施全网白名单强制策略。
- 每个后端支持
OPEN(开放)和 GRANT_REQUIRED(需授权)访问策略。
- 在 Velocity 上支持
/monban lookup <player> 以获取身份和白名单状态详情。
- 在 Velocity 上支持
/monban status 以获取运行时访问摘要。
- 有效访问检查,包含分组和直接授权的来源信息。
- 可选的 Velocity 混合
ONLINE / OFFLINE 认证流程选择。
- 将 Velocity 状态集中同步到 Bukkit 和 Paper 后端。
- 无需 LuckPerms 即可实现本地后端权限。
- 权限感知的命令帮助,以及在权限更新后刷新后端命令树。
- 跨白名单、受限访问、分组和直接权限的 Floodgate 管理。
- 在 Paper 平台边界处原生支持 Folia 兼容调度。
- 严格且带版本控制的 YAML 配置及持久化访问状态。
- 启动和访问验证采用故障关闭机制,以防止安全敏感初始化失败。
- 持久化的同步元数据,具备纪元/水印重放保护。
- 匿名 bStats 指标统计,默认启用且易于退出。
- 可选的全服务器启动后更新通知,并提供最新版本的链接。
要求
monban 插件字节码目标为 Java 21。
| 平台 |
最低要求 |
推荐 3.4.0 系列 |
备注 |
| Spigot |
1.21 |
1.21.11 |
Java 21 |
| Paper |
1.21 |
1.21.11 |
Java 21;Paper 26.x 需要 Java 25 |
| Folia |
1.21 |
1.21.11 |
Java 21;Folia 调度必须针对你的版本进行验证 |
| Velocity |
3.5.1 |
3.5.1 |
Java 21;旧版 Velocity 会在启动时故障关闭 |
| Java |
21 |
1.21.x 使用 21;Paper 26.x 使用 25 |
— |
Paper 26.x 具备 API 兼容性并可编译,但在运行时清单检查通过之前,不会被声明为默认的生产线版本。Velocity 4.x 在 3.4.0 中未获官方支持;可以尝试使用,但不提供任何保证。
不支持 Fabric、NeoForge、BungeeCord、低于 21 的 Java 版本以及低于 1.21 的 Minecraft/API 版本。
安装
- 从 Modrinth 或 GitHub Releases 下载适合你平台的构建包。
- 将 JAR 文件放入平台的
plugins/ 目录中。
- 对于独立的 Bukkit/Spigot 或 Paper/Folia,请将原生 Minecraft 白名单设置为
white-list=false。
- 首次启动服务器,配置
plugins/monban/config.yml,然后重启。
- 使用
/monban whitelist ... 管理访问权限。Velocity 还提供 /monban access ...、/monban lookup ...、/monban group ...、/monban user ... 和 /monban status 命令。
请勿在同一服务器上安装多个 monban 平台构建包。
独立服务器
对于独立服务器,monban 作为白名单权威。请在 server.properties 中禁用原生白名单:
white-list=false
白名单可以在运行时更改:
/monban whitelist enable
/monban whitelist disable
如需自动解析 ONLINE 配置文件,请使用:
/monban whitelist add online <name>
通过 /monban whitelist add online <name> <uuid> 保留显式 UUID 输入选项,并可绕过配置文件查找。
Floodgate 身份解析属于 Velocity 构建版本。独立版和后端构建版本继续使用 Java ONLINE 和 OFFLINE 身份。
Velocity 网络
Velocity 是网络白名单、后端访问、组和权限的中心权威机构。在 Velocity 上安装 monban-velocity,并在每个需要应用同步权限的后端上安装相应的 Bukkit/Spigot 或 Paper/Folia 构建版本。
在 Velocity 上启用后端权限:
backend-permissions:
enabled: true
Velocity 会自动创建 plugins/monban/sync.yml。将生成的文件及其相同内容复制到每个已启用的后端服务器。请勿在服务器之间复制 state-revision、state-epoch 或 sync-watermark.yml。
在后端的 config.yml 中启用后端权限,并将 server-name 设置为 Velocity 中注册的准确服务器名称:
backend-permissions:
enabled: true
server-name: lobby
后端会自动创建 server-groups.yml。仅在使用 SERVER_GROUP 权限或访问授权时,才需要匹配服务器组映射。
在集中式模式下,白名单、组和权限管理在 Velocity 上进行。后端服务器不管理单独的本地 monban 状态,从而防止不同服务器上出现不同的白名单或权限。
使用 Chunky 的后端权限设置示例:
/monban group create moderator
/monban group moderator access grant server lobby
/monban group moderator permission add server lobby chunky.command.start
/monban group moderator permission add server lobby chunky.command.cancel
/monban user hanamuramiyu offline group add moderator
重新连接玩家并检查 /chunky 标签补全,然后根据情况运行 /chunky start 或 /chunky cancel。
同步协议 v4
3.4.0 使用同步协议版本 4。3.4.0 和 3.3.0 会互相拒绝对方的快照,因此请同时更新 Velocity 代理和所有同步后端。
Velocity 会创建 plugins/monban/state-epoch;每个后端在第一个接受的快照后创建 plugins/monban/sync-watermark.yml。水印会在应用快照之前持久化,重启后会被重放或拒绝过时的快照。
混合 3.3.0/3.4.0 的网络会失败关闭:直到双方都使用协议 v4,后端才会暴露 monban 权限。将整个网络回滚到 3.3.0 仍然是可能的;旧构建版本会忽略 state-epoch 和 sync-watermark.yml。
Geyser 和 Floodgate
Velocity 支持 Geyser 和 Floodgate。Geyser 接受基岩版连接,Floodgate 提供经过认证的基岩版身份,monban 将该连接评估为 FLOODGATE 身份。Bukkit 和 Paper 构建版本继续对 Java 玩家使用 ONLINE 和 OFFLINE 身份;它们自身不会解析 Floodgate 身份。
在代理上安装 Geyser、Floodgate 和 monban。在生成的 Velocity 配置中启用 Floodgate:
identity:
mode: AUTO
floodgate:
enabled: true
require-provider: true
Floodgate 集成默认处于禁用状态。当基岩版访问控制是生产网络的一部分时,建议设置 require-provider: true:monban 将在启动时明显失败,而不是在没有预期的 Floodgate 提供者的情况下运行。
在 3.4.0 中,没有 enabled 字段的局部 identity.floodgate 部分表示禁用。请显式设置 enabled: true。当集成禁用时,require-provider 无效。发现提供者失败后,将拒绝连接,而不是静默回退到 Java 身份。
在向 Bedrock 玩家添加用户时,请使用报告给 monban 的标准化 Floodgate Java 用户名,包括其配置的自定义前缀。对于未链接的基岩版账户,这通常是服务器可见的名称:
/monban whitelist add floodgate .BedrockName
标准化名称是持久的访问密钥。可以随 /monban whitelist add floodgate <name> <xuid> 提供可选的 XUID,但它仅作为元数据,不会更改身份匹配。因此,Floodgate 名称更改会更改访问密钥。
同步后端权限附加到后端可以解析的 Java ONLINE 或 OFFLINE 身份。Floodgate 组和直接权限由 Velocity 评估以进行准入和代理权限;它们不会在后端上重新匹配为 FLOODGATE 身份。
指标与隐私
bStats 指标默认启用。可以在 plugins/monban/config.yml 中禁用它们:
metrics:
enabled: false
也可以在 plugins/bStats/config.yml 中全局禁用它们。
bStats 接收匿名使用数据,例如插件版本、服务器软件和版本、Java/操作系统、玩家数量、在线模式、核心数量、Velocity 上管理的后端数量以及随机安装 UUID。它不接收玩家名称、UUID、IP、聊天、命令、权限、配置文件或服务器名称。
更新通知
服务器完全启动后,monban 会检查 Modrinth 是否有新版本发布。如果 Modrinth 不可用,它将回退到 GitHub Releases。如果两者都不可用,则静默跳过检查。该检查不会阻塞启动,也不会发送服务器或玩家数据。
当找到较新版本时,日志中将包含最新版本以及指向 modrinth.com/plugin/monban 的链接。
升级至 3.4
- 备份 Velocity 和所有同步后端上的
plugins/monban/。
- 同时更新 Velocity 和所有同步后端;协议 v4 不兼容混合版本。
- 如果使用 Floodgate,请显式设置
identity.floodgate.enabled。
- 审查新的
metrics 部分。
- 在降级到 3.3.0 之前,删除
metrics 部分;3.3.0 会拒绝未知的根字段并导致失败关闭。
- 低于 3.5.1 的 Velocity 将在启动时被拒绝,并显示清晰的消息。
安全说明
backend-permissions.allow-unverified-identity 仅允许启动;它不会使身份验证状态变为已验证。
- 保持后端端口对除代理之外的所有连接关闭。
- 保持
sync.yml 私有,并确保所有参与者之间的内容完全一致。
- 同时更新 Velocity 和所有同步的后端。
- 保持 Floodgate 的密钥材料私有。
- 将因安全策略(fail-closed)导致的启动失败视为需要修复的配置错误,而不是将其作为禁用防护机制的理由。
文档
完整的设置、配置、命令、存储、权限、Geyser/Floodgate、后端同步以及混合认证相关文档可在 monban.miyu.pw 查阅。
构建
./gradlew clean build
许可证
monban 遵循 Mozilla Public License 2.0 许可协议。
monban is a whitelist, access-control, and permissions plugin with explicit ONLINE, OFFLINE, and FLOODGATE player identities. It supports standalone Bukkit/Spigot and Paper/Folia servers, and can act as the central access authority for a Velocity network with Geyser/Floodgate support, player groups, scoped backend access, and synchronized backend permissions.
The focus is not just “is this UUID allowed?” but why the identity can be trusted. Fail-closed behavior is deliberate: invalid configuration, unresolved topology, unverified backend identity, required-provider failures, and synchronization failures do not become silent allow decisions.
Supported platforms
| Platform |
Deployment |
Global whitelist |
Player permissions |
Scoped backend access |
Hybrid auth |
Floodgate identity |
| Bukkit / Spigot |
Standalone or backend |
✓ |
✓ |
— |
— |
— |
| Paper / Folia |
Standalone or backend |
✓ |
✓ |
— |
— |
— |
| Velocity |
Network authority |
✓ |
✓ |
✓ |
✓ |
✓ |
The Paper/Folia artifact is a Paper plugin and is separate from the Bukkit/Spigot compatibility artifact. Hybrid authentication-flow selection belongs to Velocity; the Paper/Folia plugin does not implement deployment.mode: VELOCITY.
Spigot, Paper, Purpur, and other drop-in Bukkit/Paper-compatible forks are supported. Spigot and Paper are tested individually; forks are API-compatible without individual guarantees. Hybrid forks such as Mohist, Arclight, and Cardboard are not supported.
Features
- Explicit
ONLINE, OFFLINE, and FLOODGATE identities instead of inferring trust from the presence of a UUID.
- Optional Geyser/Floodgate integration on Velocity for authenticated Bedrock players.
- Player groups separate from Velocity
SERVER_GROUP definitions.
- Group and direct player permissions for proxy and backend plugins.
NETWORK, SERVER_GROUP, and SERVER scopes for access rules and permissions.
- Group access grants for individual backend servers and server groups.
- One
/monban whitelist administration model across supported platforms.
- Runtime
/monban whitelist enable and /monban whitelist disable.
- Automatic ONLINE profile lookup by player name, with explicit UUID input still available.
- Interactive whitelist and scoped-access lists with pagination and filter-preserving navigation.
- Network-wide whitelist enforcement on Velocity.
- Per-backend
OPEN and GRANT_REQUIRED access policies.
/monban lookup <player> on Velocity for identity and whitelist status details.
/monban status on Velocity for a runtime access summary.
- Effective access inspection with group and direct-grant origins.
- Optional Velocity hybrid
ONLINE / OFFLINE authentication-flow selection.
- Centralized Velocity state synchronization to Bukkit and Paper backends.
- Local backend permissions without requiring LuckPerms.
- Permission-aware command help and backend command-tree refresh after permission updates.
- Floodgate administration across whitelist, scoped access, groups, and direct permissions.
- Native Folia-compatible scheduling at the Paper platform boundary.
- Strict, versioned YAML configuration and persistent access state.
- Fail-closed startup and access verification for security-sensitive initialization failures.
- Durable synchronization metadata with epoch/watermark replay protection.
- Anonymous bStats metrics, enabled by default and easy to opt out.
- Optional update notification after full server startup, with a link to the latest release.
Requirements
monban plugin bytecode targets Java 21.
| Platform |
Minimum |
Recommended 3.4.0 line |
Notes |
| Spigot |
1.21 |
1.21.11 |
Java 21 |
| Paper |
1.21 |
1.21.11 |
Java 21; Paper 26.x requires Java 25 |
| Folia |
1.21 |
1.21.11 |
Java 21; Folia scheduling must be verified for your version |
| Velocity |
3.5.1 |
3.5.1 |
Java 21; older Velocity versions fail closed at startup |
| Java |
21 |
21 for 1.21.x; 25 for Paper 26.x |
— |
Paper 26.x is API-compatible and compiles, but it is not declared the default production line until the runtime checklist passes. Velocity 4.x is not officially supported in 3.4.0; it may be tried, but no guarantees.
Fabric, NeoForge, BungeeCord, Java below 21, and Minecraft/API below 1.21 are not supported.
Install
- Download the build for your platform from Modrinth or GitHub Releases.
- Put the JAR in the platform's
plugins/ directory.
- For standalone Bukkit/Spigot or Paper/Folia, set the native Minecraft whitelist to
white-list=false.
- Start the server once, configure
plugins/monban/config.yml, then restart.
- Manage access with
/monban whitelist .... Velocity additionally provides /monban access ..., /monban lookup ..., /monban group ..., /monban user ..., and /monban status.
Do not install multiple monban platform builds on the same server.
Standalone servers
For standalone servers, monban is the whitelist authority. Disable the native whitelist in server.properties:
white-list=false
The whitelist can be changed at runtime:
/monban whitelist enable
/monban whitelist disable
For automatic ONLINE profile resolution, use:
/monban whitelist add online <name>
Explicit UUID input remains available with /monban whitelist add online <name> <uuid> and bypasses profile lookup.
Floodgate identity resolution belongs to the Velocity build. Standalone and backend builds continue to use Java ONLINE and OFFLINE identities.
Velocity networks
Velocity is the central authority for the network whitelist, backend access, groups, and permissions. Install monban-velocity on Velocity and the matching Bukkit/Spigot or Paper/Folia build on every backend that should apply synchronized permissions.
Enable backend permissions on Velocity:
backend-permissions:
enabled: true
Velocity creates plugins/monban/sync.yml automatically. Copy the generated file with the same contents to every enabled backend. Do not copy state-revision, state-epoch, or sync-watermark.yml between servers.
Enable backend permissions in the backend's config.yml and set server-name to the exact registered server name from Velocity:
backend-permissions:
enabled: true
server-name: lobby
The backend creates server-groups.yml automatically. Matching server-group mappings are only needed when SERVER_GROUP permissions or access grants are used.
In centralized mode, whitelist, group, and permission administration is performed on Velocity. Backend servers do not manage a separate local monban state, preventing different whitelists or permissions on different servers.
Example backend permission setup using Chunky:
/monban group create moderator
/monban group moderator access grant server lobby
/monban group moderator permission add server lobby chunky.command.start
/monban group moderator permission add server lobby chunky.command.cancel
/monban user hanamuramiyu offline group add moderator
Reconnect the player and check /chunky tab completion, then run /chunky start or /chunky cancel as appropriate.
Synchronization protocol v4
3.4.0 uses synchronization protocol version 4. 3.4.0 and 3.3.0 reject each other's snapshots, so update the Velocity proxy and every synchronized backend together.
Velocity creates plugins/monban/state-epoch; each backend creates plugins/monban/sync-watermark.yml after the first accepted snapshot. The watermark is persisted before a snapshot is applied, and replayed or stale snapshots are rejected after restarts.
A mixed 3.3.0/3.4.0 network fails closed: the backend exposes no monban permissions until both sides speak protocol v4. Rolling the whole network back to 3.3.0 remains possible; older builds ignore state-epoch and sync-watermark.yml.
Geyser and Floodgate
Geyser and Floodgate support is available on Velocity. Geyser accepts Bedrock connections, Floodgate supplies the authenticated Bedrock identity, and monban evaluates that connection as a FLOODGATE identity. The Bukkit and Paper builds continue to use ONLINE and OFFLINE identities for Java players; they do not resolve Floodgate identities themselves.
Install Geyser, Floodgate, and monban on the proxy. Enable Floodgate in the generated Velocity configuration:
identity:
mode: AUTO
floodgate:
enabled: true
require-provider: true
Floodgate integration is disabled by default. require-provider: true is recommended when Bedrock access control is part of the production network: monban will fail visibly at startup instead of running without the expected Floodgate provider.
In 3.4.0 a partial identity.floodgate section without enabled means disabled. Set enabled: true explicitly. require-provider is inert while the integration is disabled. A provider failure after discovery denies the connection instead of silently falling back to a Java identity.
Use the normalized Floodgate Java username reported to monban, including its configured prefix, when adding a Bedrock player. For an unlinked Bedrock account this is normally the server-visible name:
/monban whitelist add floodgate .BedrockName
The normalized name is the durable access key. An optional XUID may be supplied with /monban whitelist add floodgate <name> <xuid>, but it remains metadata and does not change identity matching. A Floodgate name change therefore changes the access key.
Synchronized backend permissions are attached to the Java ONLINE or OFFLINE identity that the backend can resolve. Floodgate groups and direct permissions are evaluated by Velocity for admission and proxy permissions; they are not re-matched as FLOODGATE identities on a backend.
Metrics and privacy
bStats metrics are enabled by default. They can be disabled in plugins/monban/config.yml:
metrics:
enabled: false
They can also be disabled globally in plugins/bStats/config.yml.
bStats receives anonymous usage data such as plugin version, server software and version, Java/OS, player count, online mode, core count, managed backend count on Velocity, and a random installation UUID. It does not receive player names, UUIDs, IPs, chat, commands, permissions, configuration files, or server names.
Update notifications
After the server has fully started, monban checks Modrinth for a newer release. If Modrinth is unavailable, it falls back to GitHub Releases. If both are unavailable, the check is skipped silently. The check does not block startup and does not send server or player data.
When a newer release is found, the log contains the latest version and a link to modrinth.com/plugin/monban.
Upgrading to 3.4
- Back up
plugins/monban/ on Velocity and every synchronized backend.
- Update Velocity and all synchronized backends together; protocol v4 is not mixed-version compatible.
- Set
identity.floodgate.enabled explicitly if you use Floodgate.
- Review the new
metrics section.
- Before downgrading to 3.3.0, delete the
metrics section; 3.3.0 rejects unknown root fields and will fail closed.
- Velocity below 3.5.1 is rejected at startup with a clear message.
Security notes
backend-permissions.allow-unverified-identity only allows startup; it does not make an identity verified.
- Keep backend ports closed to everything except the proxy.
- Keep
sync.yml private and identical on all participants.
- Update Velocity and all synchronized backends together.
- Keep Floodgate's key material private.
- Treat fail-closed startup failures as configuration errors to fix, not as permission to disable guards.
Documentation
Full setup, configuration, commands, storage, permissions, Geyser/Floodgate, backend synchronization, and hybrid authentication documentation is available at monban.miyu.pw.
Building
./gradlew clean build
License
monban is licensed under the Mozilla Public License 2.0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧