ChatBlocker 是一个轻量的纯客户端聊天关键词屏蔽 Mod(Fabric / Minecraft 1.21.8)。当其他玩家发送的消息包含你设定的关键词时,该消息只在你自己的客户端隐藏——其他玩家无感知,服务器不受影响。
ChatBlocker is a lightweight client-side chat keyword blocker for Fabric on Minecraft 1.21.8. When a message sent by other players contains your configured keywords, it is hidden on your client only — invisible to everyone else, with no effect on the server.
功能特性 | Features
屏蔽别人发送的含关键词聊天消息(仅自己不显示)
自己发送的消息正常显示,不受屏蔽影响(离线服务器按回显文本匹配豁免,可配置关闭)
屏蔽服务器公告、插件消息等系统消息(命中关键词时不显示)
包含匹配 + 不区分大小写,中英文关键词均可
游戏内命令实时管理,无需重启
ModMenu + YACL 图形配置界面
JSON 配置持久化,配置文件损坏自动容错不崩溃
纯客户端 Mod,服务器无需安装
Hide chat messages from other players that contain your keywords (client-side only)
Your own messages are always visible (on offline-mode servers, your own echoes are exempted via text matching; configurable)
Also filters system messages such as server announcements and plugin messages
Substring matching, case-insensitive — works with both Chinese and English keywords
Manage keywords in-game with commands, no restart needed
ModMenu + YACL graphical configuration screen
JSON config persistence with automatic recovery from corrupted files
Client-side only — no server installation required
使用方法 | Usage
安装后进入游戏,用命令添加关键词即可生效:
| 命令 Command | 说明 Description |
|---|---|
/chatblocker add <关键词> |
添加屏蔽关键词 Add a block keyword |
/chatblocker remove <关键词> |
移除屏蔽关键词 Remove a block keyword |
/chatblocker list |
查看全部关键词 List all keywords |
/chatblocker reload |
从配置文件重新加载 Reload from config file |
也可以在主菜单 → Mods → chatblocker → 配置按钮中编辑(需安装 ModMenu)。
You can also edit settings via Main Menu → Mods → chatblocker → Config (requires ModMenu).
配置 | Configuration
位置 Location:.minecraft/config/chatblocker.json
{
"enabled": true,
"exemptOwnEcho": true,
"keywords": ["示例词1", "badword"]
}
依赖 | Dependencies
- Fabric API(必需 Required)
- YetAnotherConfigLib(必需 Required)
- ModMenu(可选,图形配置入口 Optional, GUI entry)
开源 | Open Source
基于 MIT 许可证开源,欢迎反馈与贡献。Licensed under the MIT License, feedback and contributions welcome:

