? ZBedRockBlock
阻止基岩版玩家(通过名称前缀识别)加入 Velocity 后端的 Paper 服务器。
无需 Floodgate 钩子;仅基于名称前缀实现。专为运行在 Java 21 上的 Paper 1.21.x 构建。
功能说明(以及不包含的功能)
- ✅ 阻止 Java 用户名以配置的前缀开头的玩家(不区分大小写)。
- ✅ 踢出原因支持 MiniMessage(例如
<red>…</red>)和传统的 & 颜色代码。
- ✅ 提供用于例外情况(受信任的玩家、员工小号等)的绕过权限。
- ✅ 提供用于重载和测试的管理员命令。
- ❌ 不与 Floodgate/Geyser API 或 Mojang 认证交互;它轻量且与代理无关。
- ❌ 不管理你的队列;如果你使用了队列插件(例如 ajQueue),请将其配置为在此踢出原因发生时移除玩家。
要求
可选依赖项
安装
- 将 JAR 文件放入后端服务器的
plugins/ 文件夹中。
- 启动服务器一次,以生成
plugins/ZBedRockBlock/config.yml。
- 编辑
config.yml(见下文),然后执行 /zbedrockblock reload。
后端要求:
- 服务器位于 Velocity 之后,通常处于离线模式。
- 确保 Paper 已启用代理感知功能(标准的 Velocity 现代转发设置)。
配置 (config.yml)
enabled: true
# 管理员*不会*自动豁免;他们必须拥有绕过权限。
ignore-ops: true
# 单个精确前缀(不区分大小写)。示例:"." 或 "bedrock_"
bedrock-prefix: "."
# 踢出消息支持 MiniMessage 和传统的 & 代码。
kick-message: "<red>Bedrock accounts aren’t allowed on this server.</red>"
# 如果为 true,则将匹配决策记录到控制台。
debug: false
messages:
reload-success: "&aZBedRockBlock config reloaded."
no-permission: "&cYou don't have permission."
usage-test: "&cUsage: /zbedrockblock test <name>"
test-header: "&7Kick preview (as seen by player/proxy):"
test-allowed: "&eTest for &f%name%&e: &aALLOWED"
test-blocked: "&eTest for &f%name%&e: &cBLOCKED (would be kicked)"
提示
- 选择前缀:
使用你的基岩版玩家在 Java 端接收到的相同前缀(例如 "."、"BD_" 或 "bedrock_")。
- MiniMessage 示例:
kick-message: "<red><bold>No Bedrock accounts on this server.</bold></red>"
- 传统代码示例:
kick-message: "&c&lNo Bedrock accounts on this server."
YAML 注意事项: 请将 MiniMessage 标签保留在引号内。
✅ "<red>text</red>"
❌ "<red>text"</red>
命令
| 命令 |
描述 |
权限 |
/zbedrockblock reload |
重载插件配置 |
zbedrockblock.admin |
/zbedrockblock test <name> |
显示某个名称是否会被阻止;预览踢出消息 |
zbedrockblock.admin |
包含 Tab-completion(命令补全)。
权限
| 节点 |
适用对象 |
效果 |
zbedrockblock.admin |
管理员/工作人员 |
可访问 /zbedrockblock reload 和 /zbedrockblock test |
zbedrockblock.bypass |
特定玩家 |
允许其加入,即使其名称匹配 Bedrock 前缀 |
若要白名单放行特定的 Bedrock 玩家,请授予其 zbedrockblock.bypass 权限。
ajQueue / 队列插件注意事项(重要)
如果您使用 ajQueue(或类似插件),请确保当后端踢出玩家时,它会将其从队列中移除。
一种简单的方法是在踢出消息中包含一个关键词(例如 “Bedrock”),并配置 ajQueue 的“踢出原因”列表以匹配该词。这样 ajQueue 就会将其弹出队列,而不是让其循环排队。
示例方法:
- 保留默认的踢出消息(
"Bedrock …")或任何包含一致关键词的消息。
- 将该关键词添加到您的队列插件配置中,使其在后端踢出消息中进行包含匹配。
兼容性
- 服务器: Paper 1.21.x(包括 1.21.10)
- Java: 21
- 代理: 在 Velocity 后方运行良好。无需 Velocity/Waterfall 辅助插件。
- 其他插件: 与几乎所有插件都能和谐共存;它仅读取配置文件并监听
PlayerLoginEvent。
常见场景
阻止所有 Bedrock 用户通过单一后端连接:
bedrock-prefix: "."
kick-message: "<red>No Bedrock accounts on this server.</red>"
允许特定的 Bedrock 用户(管理员小号):
- 通过您的权限插件授予其
zbedrockblock.bypass 权限。
暂时禁用插件而不删除它:
enabled: false
然后执行 /zbedrockblock reload。
故障排除
-
重载时出现 YAML 错误:
通常是因为 kick-message 中的引号问题。如果使用 <tags> 或 & 代码,请将整个消息用引号括起来。
-
玩家在队列中循环:
队列插件未配置为在该踢出原因下移除他们。将踢出消息中的关键词添加到队列插件的“踢出原因”列表(或等效设置)中。
-
启动时出现 “429” Mojang 警告:
这是 Mojang 对个人资料查询(皮肤)进行的速率限制,通常由皮肤/头颅/装饰/标签页等插件触发——而非本插件。考虑在这些插件中启用缓存或禁用启动时的获取功能。
-
OP 被阻止:
这是设计如此。如果您希望 OP 豁免,可以设置 ignore-ops: false(即使匹配也允许 OP 进入)或授予 OP zbedrockblock.bypass 权限。
卸载
- 从
plugins/ 目录中移除 JAR 文件。
- (可选)如果不再需要配置文件,删除
plugins/ZBedRockBlock/ 文件夹。
- 重启服务器。
?? 作者
? ZBedRockBlock
Blocks Bedrock players (identified by a name prefix) from joining a backend Paper server behind Velocity.
No Floodgate hooks; purely name-prefix based. Built for Paper 1.21.x on Java 21.
What it does (and doesn’t) do
- ✅ Blocks players whose Java username starts with the configured prefix (case-insensitive).
- ✅ Kick reason supports MiniMessage (e.g.,
<red>…</red>) and legacy & color codes.
- ✅ Bypass permission for exceptions (trusted players, staff alts, etc).
- ✅ Admin commands for reload and test.
- ❌ Doesn’t talk to Floodgate/Geyser APIs or Mojang auth; it’s lightweight and proxy-agnostic.
- ❌ Doesn’t manage your queue; if you use a queue plugin (e.g., ajQueue), configure it to remove players on this kick reason.
Requirements
Optional dependencies
- LuckPerms (or any permissions plugin)
Installation
- Place the JAR into the backend server’s
plugins/ folder.
- Start the server once to generate
plugins/ZBedRockBlock/config.yml.
- Edit
config.yml (see below), then /zbedrockblock reload.
Backend requirements:
- Server is behind Velocity and typically offline mode.
- Make sure Paper is proxy-aware (standard Velocity modern forwarding setup).
Configuration (config.yml)
enabled: true
# Ops are *not* automatically exempt; they must have the bypass permission.
ignore-ops: true
# Single, exact prefix (case-insensitive). Example: "." or "bedrock_"
bedrock-prefix: "."
# Kick message supports MiniMessage and legacy & codes.
kick-message: "<red>Bedrock accounts aren’t allowed on this server.</red>"
# Logs match decisions to console if true.
debug: false
messages:
reload-success: "&aZBedRockBlock config reloaded."
no-permission: "&cYou don't have permission."
usage-test: "&cUsage: /zbedrockblock test <name>"
test-header: "&7Kick preview (as seen by player/proxy):"
test-allowed: "&eTest for &f%name%&e: &aALLOWED"
test-blocked: "&eTest for &f%name%&e: &cBLOCKED (would be kicked)"
Tips
- Choosing the prefix:
Use the same prefix your Bedrock players receive on Java (e.g., ".", "BD_", or "bedrock_").
- MiniMessage example:
kick-message: "<red><bold>No Bedrock accounts on this server.</bold></red>"
- Legacy example:
kick-message: "&c&lNo Bedrock accounts on this server."
YAML gotcha: Keep MiniMessage tags inside the quotes.
✅ "<red>text</red>"
❌ "<red>text"</red>
Commands
| Command |
Description |
Permission |
/zbedrockblock reload |
Reloads the plugin configuration |
zbedrockblock.admin |
/zbedrockblock test <name> |
Shows whether a name would be blocked; previews the kick message |
zbedrockblock.admin |
Tab-completion is included.
Permissions
| Node |
Who should get it |
Effect |
zbedrockblock.admin |
Admins/staff |
Access to /zbedrockblock reload and /zbedrockblock test |
zbedrockblock.bypass |
Specific players |
Allows joining even if their name matches the Bedrock prefix |
To whitelist a specific Bedrock player, grant them zbedrockblock.bypass.
ajQueue / Queue plugin note (important)
If you use ajQueue (or similar), make sure it removes players from the queue when they’re kicked by this backend.
A simple way is to include a keyword in your kick message (e.g., “Bedrock”) and configure ajQueue’s “kick reasons” list to match that word. ajQueue will then pop them out of the queue instead of looping them.
Example approach:
- Keep the default kick message (
"Bedrock …") or any message containing a consistent keyword.
- Add that keyword to your queue plugin’s configuration where it looks for contains matches in backend kick messages.
Compatibility
- Server: Paper 1.21.x (including 1.21.10)
- Java: 21
- Proxy: Works fine behind Velocity. No Velocity/Waterfall helper plugin required.
- Other plugins: Plays nicely with virtually everything; it only reads config and listens for
PlayerLoginEvent.
Common scenarios
Block all Bedrock users across one backend:
bedrock-prefix: "."
kick-message: "<red>No Bedrock accounts on this server.</red>"
Allow a specific Bedrock user (staff alt):
- Grant them
zbedrockblock.bypass via your permissions plugin.
Temporarily disable the plugin without removing it:
enabled: false
Then /zbedrockblock reload.
Troubleshooting
-
YAML error on reload:
Most often a quoting issue in kick-message. Keep the entire message in quotes if you use <tags> or & codes.
-
Players looping in queue:
The queue plugin isn’t configured to drop them on this kick reason. Add a keyword from your kick message to the queue plugin’s “kick reasons” list (or equivalent).
-
“429” Mojang warnings on startup:
That’s Mojang rate-limiting for profile lookups (skins), usually triggered by skins/heads/cosmetics/tablist plugins—not this plugin. Consider enabling caches or disabling startup fetches in those plugins.
-
Ops getting blocked:
This is by design. If you want ops exempt, either set ignore-ops: false (lets ops in even if they match) or grant ops zbedrockblock.bypass.
Uninstall
- Remove the JAR from
plugins/.
- (Optional) Delete
plugins/ZBedRockBlock/ if you don’t need the config anymore.
- Restart the server.
?? Author
评论 0
登录后参与评分
还没有评论,来抢沙发吧