PureFilter
PureFilter 是一款专为运行在 Paper 26.1.2(及更高版本,需要 Java 25)的现代服务器设计的先进、轻量且高效的聊天脏话过滤插件。
与仅检查完全匹配的传统过滤器不同,PureFilter 利用智能模糊匹配引擎。通过实时处理和规范化玩家消息,它能轻松阻止各种巧妙的绕过尝试。
? 主要功能
- 智能模糊匹配引擎: 自动检测并中和绕过尝试,包括:
- Leet-speak(黑客语): 用数字或符号替换字母(例如
0→o、3→e、4→a、5→s、!→i、$+s)。
- 聊天分隔符: 使用空格、点号、连字符、下划线或特殊字符将单词拆分开来。
- Unicode 同形字 / 西里尔字母: 阻止使用其他字母表中相似外观的字符来伪装违禁词。
- 重复字符: 自动合并重复的字母。
- 三种操作模式 (
filter.mode):
AUTO:使用内置的强大且积极的英文 (en.txt) 和波兰文 (pl.txt) 词表。
MANUAL:完全忽略内置词表,仅依赖位于 words/custom/ 目录内的自定义文件。
AUTO_MANUAL:结合内置词表和自定义词表,以实现最大程度的安全性。
- 自动惩罚系统: 当检测到违禁词时,立即执行任何已配置的控制台命令(例如自动临时静音)。
- 聊天内管理员警报: 向拥有相应权限的工作人员提供实时通知,并在严格 AUTO 模式激活时显示明确警告。
- 现代聊天支持: 完整集成 Adventure API,原生支持传统颜色代码 (
&c, &a) 和现代 HEX (#RRGGBB) 格式。
- 高性能: 违禁词被预计算并存储在高速
HashSet 中,确保实现即时 $O(1)$ 查找,且不影响服务器线程性能。
?️ 命令与权限
每个子命令都在源代码内部直接处理独立的权限检查:
/purefilter reload (别名: /pf reload) – 重新加载配置文件和词表。
- 权限:
purefilter.admin.reload
/purefilter info (别名: /pf info) – 显示插件版本、当前过滤器模式和已加载的词数。
- 权限:
purefilter.admin.info
/purefilter status (别名: /pf status) – 显示过滤器当前是启用还是禁用状态。
- 权限:
purefilter.admin.status
附加权限:
purefilter.admin – 父级权限节点(自动授予对 reload、info 和 status 的访问权限)。默认值:OP。
purefilter.admin.message – 允许在玩家触发过滤器时接收聊天内的警报。默认值:OP。
purefilter.admin.override – 完全绕过过滤器。 来自该玩家的任何消息都不会被检查或拦截。注意:此权限故意不作为 purefilter.admin 的子权限,必须显式授予(例如通过 LuckPerms)。 默认值:false。
⚙️ 默认配置 (config.yml)
插件会自动生成一个干净的配置文件,开箱即用即支持多语言系统消息:
plugin:
enabled: true
language: en
prefix: "&8[&b&lPureFilter&8]&r "
filter:
mode: AUTO
manual-files:
# - mywords.txt
punishment:
commands:
- "tempmute {player} 5m"
PureFilter
PureFilter is an advanced, lightweight, and highly effective chat profanity filtering plugin designed for modern servers running on Paper 26.1.2 (and higher, requiring Java 25).
Unlike traditional filters that only check for exact word matches, PureFilter utilizes an intelligent Fuzzy-Matching engine. By processing and normalizing player messages on the fly, it effortlessly blocks even the most clever attempts to bypass the filter.
? Key Features
- Intelligent Fuzzy-Matching Engine: Automatically detects and neutralizes bypass attempts, including:
- Leet-speak: Substitution of letters with numbers or symbols (e.g.,
0→o, 3→e, 4→a, 5→s, !→i, $+s).
- Chat Separators: Breaking up words with spaces, dots, dashes, underscores, or special characters.
- Unicode Homoglyphs / Cyrillic: Blocks lookalike characters from other alphabets used to disguise banned words.
- Repeated Characters: Automatically collapses duplicated letters.
- Three Operation Modes (
filter.mode):
AUTO: Uses the powerful, aggressive built-in word lists for English (en.txt) and Polish (pl.txt).
MANUAL: Completely ignores built-in lists and relies solely on your custom files inside the words/custom/ directory.
AUTO_MANUAL: Combines both built-in lists and your custom word lists for maximum security.
- Automated Punishment System: Automatically dispatches any configured console commands instantly when a prohibited word is flagged (e.g., auto temp-mute).
- In-Chat Admin Alerts: Real-time staff notifications for players with the required permission, featuring explicit warnings when the strict AUTO mode is active.
- Modern Chat Support: Full Adventure API integration, providing native support for legacy color codes (
&c, &a) and modern HEX (#RRGGBB) format.
- High Performance: Banned words are pre-computed and stored in a high-speed
HashSet, ensuring instant $O(1)$ lookups without affecting server thread performance.
?️ Commands & Permissions
Every subcommand features independent permission checks handled directly within the source code:
/purefilter reload (Alias: /pf reload) – Reloads the configuration and word lists.
- Permission:
purefilter.admin.reload
/purefilter info (Alias: /pf info) – Displays plugin version, active filter mode, and loaded word count.
- Permission:
purefilter.admin.info
/purefilter status (Alias: /pf status) – Displays whether the filter is currently enabled or disabled.
- Permission:
purefilter.admin.status
Additional Permissions:
purefilter.admin – Parent permission node (automatically grants access to reload, info, and status). Default: OP.
purefilter.admin.message – Allows receiving in-chat alerts when a player triggers the filter. Default: OP.
purefilter.admin.override – Complete filter bypass. Messages from this player are never checked or blocked. Note: This permission is intentionally NOT a child of purefilter.admin and must be explicitly granted (e.g., via LuckPerms). Default: false.
⚙️ Default Configuration (config.yml)
The plugin automatically generates a clean config file supporting multilingual system messages out-of-the-box:
plugin:
enabled: true
language: en
prefix: "&8[&b&lPureFilter&8]&r "
filter:
mode: AUTO
manual-files:
# - mywords.txt
punishment:
commands:
- "tempmute {player} 5m"
评论 0
登录后参与评分
还没有评论,来抢沙发吧