Zen
Zen 通过 Bale Bot 官方 API 将 Minecraft 聊天与 Bale 群组连接起来。
在游戏中发送的消息会显示在 Bale 中,而在 Bale 中发送的消息则会直接传送到 Minecraft。
功能
-
双向聊天桥接 — 实时同步 Minecraft 和 Bale 之间的消息。
-
官方 Bale Bot API 集成 — 使用 Bale 的官方 API 进行通信。
-
重试系统 — 对失败的 API 请求自动执行指数退避重试。
-
按事件控制 — 启用或禁用各个桥接事件:
- 聊天消息
- 玩家加入
- 玩家离开
- 死亡消息
- 进度达成(Advancements)
-
速率限制 — 基于令牌桶机制,防止垃圾信息和 API 滥用。
-
改进的日志记录 — 提供包含可操作错误信息的详细控制台输出。
-
线程安全架构 — 专为并发消息处理和验证而设计。
-
长轮询支持 — 通过偏移量跟踪高效获取更新。
-
违禁词过滤 — 在消息到达任一平台之前拦截配置的违禁词。
-
玩家忽略列表 — 排除选定的玩家不参与桥接。
-
自定义格式 — 支持占位符和 Minecraft 颜色格式化。
-
轻量级且可配置 — 设置简单,开销极小。
命令
| 命令 |
权限 |
描述 |
/zen reload |
zen.admin |
重新加载插件配置 |
/zen status |
zen.admin |
显示桥接状态 |
/zen info |
zen.admin |
显示插件信息 |
/bale <message> |
zen.bale |
直接向已连接的 Bale 群组发送消息 |
配置
bale:
token: "YOUR_BALE_BOT_TOKEN"
group-id: "YOUR_GROUP_ID"
api-base: "https://tapi.bale.ai"
poll-interval: 3
timeout: 30
支持的占位符
| 占位符 |
描述 |
%player% |
Minecraft 玩家名称 |
%displayname% |
Minecraft 显示名称 |
%message% |
消息内容 |
%username% |
Bale 用户名 |
安装
- 创建 Bale 机器人并获取其 API 令牌
- 将该机器人添加到你的 Bale 群组中
- 从 Bale 更新中获取群组 ID
- 将插件 JAR 文件放入服务器的
plugins 目录
- 启动服务器以生成配置文件
- 编辑
plugins/Zen/config.yml 并输入你的令牌和群组 ID
- 重启服务器
工作原理
Minecraft → Bale
玩家在 Minecraft 中发送的消息会被直接转发到配置的 Bale 群组。
要求
- Java 21+
- Bukkit、Spigot、Paper 或兼容的服务器软件
- 有效的 Bale Bot 令牌
- Bale 群组 ID
许可证
本项目根据 MIT 许可证发布。
Zen
Zen bridges Minecraft chat with Bale messenger groups through the official Bale Bot API
Messages sent in-game appear in Bale, and messages sent in Bale are delivered directly to Minecraft
Features
-
Two-Way Chat Bridge — Synchronize messages between Minecraft and Bale in real time.
-
Official Bale Bot API Integration — Uses Bale's official API for communication.
-
Retry System — Automatic exponential backoff for failed API requests
-
Per-Event Control — Enable or disable individual bridge events:
- Chat messages
- Player joins
- Player leaves
- Death messages
- Advancements
-
Rate Limiting — Token-bucket based protection against spam and API abuse
-
Improved Logging — Detailed console output with actionable error information
-
Thread-Safe Architecture — Designed for concurrent message processing and validation
-
Long Polling Support — Efficient update retrieval with offset tracking
-
Banned Word Filter — Block configured words before they reach either platform
-
Player Ignore List — Exclude selected players from the bridge
-
Custom Formatting — Supports placeholders and Minecraft color formatting
-
Lightweight & Configurable — Simple setup with minimal overhead
Commands
| Command |
Permission |
Description |
/zen reload |
zen.admin |
Reload plugin configuration |
/zen status |
zen.admin |
Display bridge status |
/zen info |
zen.admin |
Show plugin information |
/bale <message> |
zen.bale |
Send a message directly to the connected Bale group |
Configuration
bale:
token: "YOUR_BALE_BOT_TOKEN"
group-id: "YOUR_GROUP_ID"
api-base: "https://tapi.bale.ai"
poll-interval: 3
timeout: 30
Supported Placeholders
| Placeholder |
Description |
%player% |
Minecraft player name |
%displayname% |
Minecraft display name |
%message% |
Message content |
%username% |
Bale username |
Installation
- Create a Bale bot and obtain its API token
- Add the bot to your Bale group
- Retrieve the group ID from Bale updates
- Place the plugin JAR into your server's
plugins directory
- Start the server to generate configuration files
- Edit
plugins/Zen/config.yml and enter your token and group ID
- Restart the server
How It Works
Minecraft → Bale
Messages sent by players in Minecraft are forwarded directly to the configured Bale group
Requirements
- Java 21+
- Bukkit, Spigot, Paper, or compatible server software
- Valid Bale Bot Token
- Bale Group ID
License
This project is released under the MIT License
评论 0
登录后参与评分
还没有评论,来抢沙发吧