高级脏话过滤器
面向 Fabric 1.21.x & 26.x 的下一代毒性控制方案
Advanced Profanity Filter 是一款轻量级的服务端工具,旨在无需持续人工审核的情况下维护社区规范。与容易被空格或符号绕过的基础过滤器不同,本模组采用激进的 标准化引擎(Normalization Engine),在消息进入聊天前就剥离所有绕过尝试。
主要功能
-
多版本保护: 完全兼容所有 Fabric 1.21.x 版本以及最新的 26.x 快照/正式版。
-
标准化引擎(防绕过): 自动通过去除空格、句点、下划线和特殊字符来扁平化消息,从而暴露隐藏的违规词汇。
-
符号与数字变体检测: 智能检测字符替换行为(例如用 @ 代替 a,用 $ 代替 s,用 0 代替 o)。
-
整条消息拦截: 阻止整条消息发送,以维持干净的聊天环境,并防止现代 Fabric 版本中常见的“签名聊天”错误。
-
自动化执行层级:
- 警告: 向违规者发送自定义警告信息。
- 自动踢出: 在达到设定数量的警告后触发(默认:3次)。
- 自动封禁: 在重复违规后进行永久移除(默认:10次)。
-
PvP 感知逻辑: 专门调优以忽略常见的游戏术语(如 TNT、Spear、Raid),同时严格针对侮辱性言论和毒性行为进行管控。
优化你的服务器设置! 请访问此处查看我的其他服务端模组:Fabric Server Essentials
配置文件 (profanity_filter.json)
模组会在服务器的 /config 文件夹中生成一个高度细粒度的配置文件。以下是供服务器管理员使用的主要设置项:
| 设置项 |
类型 |
默认值 |
描述 |
kick_threshold |
整数 |
3 |
触发自动踢出服务器前的警告次数。 |
ban_threshold |
整数 |
10 |
触发自动永久封禁前的警告次数。 |
normalization_level |
字符串 |
AGGRESSIVE |
设置引擎剥离特殊字符的严格程度。支持 AGGRESSIVE 或 BASIC。 |
enable_leetspeak |
布尔值 |
true |
是否检查类似 $ 代表 s 的字符替换。 |
标准化级别说明
BASIC:仅检查简单的单词匹配和直接的数字变体转换,不会大幅改变句子布局。
AGGRESSIVE:通过彻底去除所有空格、制表符、句点、下划线和特殊标点符号,完全扁平化输入消息,以暴露隐藏或被空格分隔的毒性文本串。
管理与词典
- 实时词典: 预加载了 1,000+ 种变体列表,可通过 JSON 配置文件实时编辑,无需重启服务器。
- 自定义消息: 完全支持经典迷你消息格式或标准颜色代码,用于所有警告、踢出和封禁消息。
- 排除列表: 可添加特定短语,即使包含被标记的字符,过滤器也应忽略这些短语。
性能与技术
仅限服务端: 玩家无需安装此模组即可加入你的服务器!
专为运行在现代硬件上的高人口网络设计。逻辑使用 FastUtil 集合和高效处理管道进行了重度优化,确保即使在激烈的全球聊天活动期间也能实现 零“聊天延迟” 且不影响 TPS。
安装步骤
- 将
.jar 文件放入服务器的 mods 文件夹。
- 确保为你的目标环境(1.21.x 或 26.x)安装了正确版本的 Fabric API。
- 在
config/profanity_filter.json 中配置词库和阈值。
- 重启服务器以应用更改,享受干净的聊天体验!
Advanced Profanity Filter
Next-Gen Toxicity Control for Fabric 1.21.x & 26.x
Advanced Profanity Filter is a lightweight, server-side utility designed to maintain community standards without constant manual moderation. Unlike basic filters that are easily tricked by spaces or symbols, this mod uses an aggressive Normalization Engine to strip bypass attempts before they ever hit the chat.
Key Features
-
Multi-Version Protection: Fully compatible across all Fabric 1.21.x versions and the latest 26.x snapshots/releases.
-
Normalization Engine (Anti-Bypass): Automatically flattens messages by stripping spaces, periods, underscores, and special characters to expose hidden words.
-
Symbol & Leetspeak Detection: Intelligent detection for character replacements (e.g., @ for a, $ for s, 0 for o).
-
Total Message Prevention: Blocks the entire message from being sent to maintain a clean chat environment and prevent "signed chat" errors common in modern Fabric versions.
-
Automated Enforcement Tiers:
-
Warnings: Issues a customizable warning message to the offender.
-
Automated Kick: Triggered after a set amount of warnings (Default: 3).
-
Automated Ban: Permanent removal after repeated violations (Default: 10).
-
PvP-Aware Logic: Specifically tuned to ignore common gameplay terms (TNT, Spear, Raid) while focusing strictly on insults and toxic behavior.
Enhance your server setup! Check out my other server-side mods over at : Fabric Server Essentials
Configuration (profanity_filter.json)
The mod generates a highly granular config file in your server's /config folder. Below are the primary settings available to server owners:
| Setting |
Type |
Default |
Description |
kick_threshold |
Integer |
3 |
Number of warnings before an automated server kick. |
ban_threshold |
Integer |
10 |
Number of warnings before an automated permanent ban. |
normalization_level |
String |
AGGRESSIVE |
Sets how strictly the engine strips special characters. Supports AGGRESSIVE or BASIC. |
enable_leetspeak |
Boolean |
true |
Whether to check for character replacements like $ for s. |
Normalization Levels Explained
BASIC: Checks for simple word matches and direct leetspeak transformations without changing the sentence layout drastically.
AGGRESSIVE: Completely flattens the input message by completely stripping out all spaces, tabs, periods, underscores, and special punctuation characters to expose hidden or spaced-out toxic text strings.
Management & Dictionary
- Live Dictionary: A pre-loaded list of 1,000+ variations that can be edited in real-time via the JSON config without a server restart.
- Custom Messaging: Fully supports classic mini-message or standard color codes for all warning, kick, and ban messages.
- Exclusion List: Add specific phrases that the filter should ignore, even if they contain flagged characters.
Performance & Tech
Server-Side Only: Players do not need to install this mod to join your server!
Designed for high-population networks running modern hardware. The logic is heavily optimized using FastUtil collections and efficient processing pipelines, ensuring zero "chat lag" or impact on TPS, even during intense, heavy global chat activity.
Installation
- Drop the
.jar into your server's mods folder.
- Ensure you have the correct Fabric API version installed for your target environment (1.21.x or 26.x).
- Configure your word list and thresholds in
config/profanity_filter.json.
- Restart the server to apply changes and enjoy a clean chat!
评论 0
登录后参与评分
还没有评论,来抢沙发吧