发现错误或有任何功能建议?在 GitHub 上提交 Issue
FlowChat
基于正则表达式的 Minecraft 聊天处理器。对聊天消息进行替换、过滤、弹出提示、自动回复和播放声音——支持客户端和服务端在所有主要平台上运行。当前版本:2.1.2。
平台
| 平台 |
类型 |
版本 |
| Fabric |
客户端模组 |
1.14.4 - 1.21.11 |
| Forge |
客户端模组 |
1.7.10 - 1.21.11 |
| NeoForge |
客户端模组 |
1.20.4 - 1.21.11 |
| Spigot/Paper |
服务端插件 |
1.7.10 - 1.21.11 |
| BungeeCord |
代理插件 |
最新版 |
| Velocity |
代理插件 |
最新版 |
特性
- 正则替换 -- 使用正则表达式匹配传入的聊天消息,并替换为格式化文本
- 发送消息规则 -- 拦截并重写你发送的消息(命令别名、颜色前缀等)
- 颜色感知匹配 --
colorAware: true 会在保留颜色代码的情况下匹配文本;替换内容支持 &a、&l 等格式
- Toast 通知 -- 将匹配到的消息从聊天窗口重定向到屏幕上方显示 (
"toast": true)
- 通知样式 --
"notifyStyle": "actionbar" (默认), "toast" (系统 Toast), 或 "advancement" (成就弹窗)
- 声音提醒 -- 匹配时播放声音:
"sound": true (默认声音), "sound": "bell" (特定声音), 或 "sound": "note_pling"
- 自动回复 -- 当模式匹配时发送命令/消息:
"respond": "/cmd" (单个) 或 "respond": ["/cmd1", "/"/cmd2"] (多个)
- JSON 匹配 --
matchJson: true 针对原始 JSON 聊天组件而非显示文本进行匹配
- 数值累加 -- 将快速连续消息中的数字捕获组聚合为累计总值
- 标签选择器 --
{player}, {time}, {biome}, {item_name} 以及 更多 389 个 可在替换中展开
- 服务器过滤 --
"server": "^mc\\.example\\.com" 限制规则仅在匹配的服务器上生效
- 消息取消 -- 将替换内容设置为
pleasecancelthismessage 可完全隐藏该消息不显示在聊天中
- 热重载 -- 编辑规则文件无需重启游戏或服务器
- 旧字段支持 -- 旧字段名 (
search, toastMe, respondMsg, serversearch, msgsearch, msgreplacement) 仍可通过别名正常工作
规则格式
{
"incoming": [
{ "pattern": "hello", "replacement": "world" },
{ "pattern": "alert_me", "toast": true, "sound": "bell", "notifyStyle": "advancement" },
{ "pattern": "greet", "respond": ["/say Hi!", "/say Welcome!"] }
],
"outgoing": [
{ "pattern": "/b", "replacement": "/bottle get 64" }
]
}
数值累加
跨快速连续消息聚合数字捕获组。当商店快速发送多行消息时(例如批量出售物品),数值累加会将其合并为累计总和。
| 令牌 |
含义 |
$1, $2, ... |
标准正则表达式组引用(仅限当前匹配项) |
$^1, $^2, ... |
该组的累加值(累积总和) |
$^i |
迭代计数(已累加的消息数量) |
安装
客户端: 从 Releases 下载对应 MC 版本和加载器的 JAR 文件。将其放入 mods/ 文件夹。FlowChat 首次启动时会在 .minecraft/config/flowchat.json 创建默认配置文件。
服务端: 从 Releases 下载服务端 JAR(Spigot、Bungee、Velocity 或 Unified)。将其放入 plugins/ 文件夹。对于 1.14.4+ 的服务端,请安装 PacketEvents 以实现数据包级别的聊天拦截(可选——若无此插件则回退至 Bukkit 事件)。
重载: 编辑 flowchat.json 并在游戏中运行 /flowchat reload。无需重启。
链接
Found a bug or have a feature request? Open an issue on GitHub
FlowChat
Regex-powered chat processor for Minecraft. Replace, filter, toast, auto-respond, and play sounds on chat messages -- works on clients and servers across every major platform. Current version: 2.1.2.
Platforms
| Platform |
Type |
Versions |
| Fabric |
Client mod |
1.14.4 - 1.21.11 |
| Forge |
Client mod |
1.7.10 - 1.21.11 |
| NeoForge |
Client mod |
1.20.4 - 1.21.11 |
| Spigot/Paper |
Server plugin |
1.7.10 - 1.21.11 |
| BungeeCord |
Proxy plugin |
Latest |
| Velocity |
Proxy plugin |
Latest |
Features
- Regex replacement -- Match incoming chat with regex, replace with formatted text
- Outgoing message rules -- Intercept and rewrite messages you send (command aliases, color prefixing)
- Color-aware matching --
colorAware: true matches against text with color codes preserved; replacements support &a, &l, etc.
- Toast notifications -- Redirect matched messages from chat to overlay display (
"toast": true)
- Notification styles --
"notifyStyle": "actionbar" (default), "toast" (system toast), or "advancement" (achievement popup)
- Sound alerts -- Play sounds on match:
"sound": true (default sound), "sound": "bell" (specific sound), or "sound": "note_pling"
- Auto-responses -- Send a command/message when a pattern matches:
"respond": "/cmd" (single) or "respond": ["/cmd1", "/cmd2"] (multi)
- JSON matching --
matchJson: true matches against raw JSON chat components instead of displayed text
- Value stacking -- Aggregate numeric capture groups across rapid messages into running totals
- Tag selectors --
{player}, {time}, {biome}, {item_name}, and 389 more expanded in replacements
- Server filtering --
"server": "^mc\\.example\\.com" restricts a rule to matching servers only
- Message cancellation -- Set replacement to
pleasecancelthismessage to hide a message from chat entirely
- Hot-reload -- Edit rules file without restarting the game or server
- Legacy field support -- Old field names (
search, toastMe, respondMsg, serversearch, msgsearch, msgreplacement) still work via aliases
Rule Format
{
"incoming": [
{ "pattern": "hello", "replacement": "world" },
{ "pattern": "alert_me", "toast": true, "sound": "bell", "notifyStyle": "advancement" },
{ "pattern": "greet", "respond": ["/say Hi!", "/say Welcome!"] }
],
"outgoing": [
{ "pattern": "/b", "replacement": "/bottle get 64" }
]
}
Value Stacking
Aggregates numeric capture groups across rapid successive messages. When a shop sends multiple lines quickly (e.g. selling items in bulk), value stacking collapses them into a running total.
| Token |
Meaning |
$1, $2, ... |
Standard regex group references (current match only) |
$^1, $^2, ... |
Stacked value for that group (accumulated total) |
$^i |
Iteration count (how many messages stacked) |
Installation
Client: Download the JAR for your MC version and loader from Releases. Drop it in your mods/ folder. FlowChat creates a default config at .minecraft/config/flowchat.json on first launch.
Server: Download the server JAR (Spigot, Bungee, Velocity, or Unified) from Releases. Drop it in plugins/. For 1.14.4+ servers, install PacketEvents for packet-level chat interception (optional -- falls back to Bukkit events).
Reload: Edit flowchat.json and run /flowchat reload in-game. No restart needed.
Links
评论 0
登录后参与评分
还没有评论,来抢沙发吧