Better Anti Swear 是一款适用于 Spigot 和 Paper 的插件,用于检测并处理服务器聊天中的不当用语。该插件以灵活性为核心设计理念,允许服务器管理员通过配置文件几乎自定义插件的所有功能。
检测机制
该插件超越了简单的单词匹配。它能够识别类似用 3 代替 e、@ 代替 a、1 代替 i 等“数字/符号替换”(Leet-speak)行为。同时,它还能捕获重复字符的词汇(如 "fuuuuck")以及在字母间插入空格的输入方式。支持部分单词匹配,并内置了白名单以防止对 "assassin" 或 "classic" 等词汇产生误报。
惩罚系统
每次违规计数都对应 punishments.yml 文件中独立的惩罚条目。默认设置采用递进式惩罚:首次违规发出警告,第二次内部禁言,第三次踢出服务器,第四次临时封禁,第五次永久封禁。所有惩罚均通过控制台命令执行,这意味着它可以与 EssentialsX、LiteBans、AdvancedBan、CMI 或你已安装的任何其他惩罚插件无缝协作。你也可以选择使用无需任何依赖项的内置内部禁言功能。
管理员通知
当玩家触发检测时,管理员会同时收到两条警报:聊天栏的一条消息以及热键栏上方显示的动作栏通知。这两个渠道均可在 config.yml 中独立切换开关。
配置文件
config.yml:主开关、检测选项、优化设置、聊天行为配置
badwords.yml:词汇组、白名单及可选的正则表达式模式
punishments.yml:针对每次违规的惩罚定义,完全支持控制台命令
messages.yml:插件输出的所有字符串,可完全自定义
命令
所有命令均可通过 /bas 前缀调用,并支持 Tab 补全。
/bas reload
/bas check (player)
/bas reset (player)
/bas addword (word) (group)
/bas removeword (word)
/bas list (group)
/bas info
权限
该插件使用标准的 Bukkit 权限系统,兼容 LuckPerms、PermissionsEx、GroupManager、PowerRanks 以及任何其他支持 Vault 的权限插件。
betterantiswear.admin:拥有所有命令和通知的完全访问权限
betterantiswear.bypass:完全跳过检测
betterantiswear.notify:接收警报而无需完整的管理员权限
每个子命令都有对应的独立权限节点
要求
Spigot 或 Paper 1.20 及以上版本。Java 17 或更高版本。
Better Anti Swear is a Spigot and Paper plugin that detects and handles inappropriate language in your server's chat. It is built with flexibility in mind, allowing server owners to configure nearly every aspect of the plugin through its configuration files.
Detection
The plugin goes beyond simple word matching. It handles leet-speak substitutions such as 3 for e, @ for a, 1 for i, and so on. It also catches words with repeated characters like "fuuuuck" and words typed with spaces between letters. Partial word matching is supported, and a whitelist is included to prevent false positives on words like "assassin" or "classic".
Punishment System
Each violation count maps to its own punishment entry in punishments.yml. The default setup escalates from a warning on the first offense, to an internal chat mute on the second, a kick on the third, a temporary ban on the fourth, and a permanent ban on the fifth. Every punishment is driven by console commands, which means it works with EssentialsX, LiteBans, AdvancedBan, CMI, or any other punishment plugin you already have installed. You can also use the built-in internal mute without any dependency.
Admin Notifications
When a player triggers a detection, admins receive two simultaneous alerts: a message in their chat feed and an action bar notification displayed above the hotbar. Both channels can be toggled independently in config.yml.
Configuration Files
config.yml: master switch, detection toggles, optimization settings, chat behavior
badwords.yml: word groups, whitelist, and optional regex patterns
punishments.yml: per-violation punishment definitions with full console command support
messages.yml: every string the plugin outputs, fully customizable
Commands
All commands are available under /bas with tab completion.
/bas reload
/bas check (player)
/bas reset (player)
/bas addword (word) (group)
/bas removeword (word)
/bas list (group)
/bas info
Permissions
The plugin uses standard Bukkit permissions, compatible with LuckPerms, PermissionsEx, GroupManager, PowerRanks, and any other Vault-compatible permission plugin.
betterantiswear.admin: full access to all commands and notifications
betterantiswear.bypass: skip detection entirely
betterantiswear.notify: receive alerts without full admin access
Individual permissions are available for each sub-command
Requirements
Spigot or Paper 1.20 and above. Java 17 or higher.
评论 0
登录后参与评分
还没有评论,来抢沙发吧