YASF: Yet Another Swearing Filter
YASF 是又一款脏话过滤插件,它内置了高级的“智能过滤器”,并支持创建自定义过滤器。YASF 还允许你选择在检测到违规行为时采取哪些操作(踢出、杀死、燃烧、封禁、取消管理员权限、向玩家发送消息,以及/或执行任意数量的自定义服务器命令)。
功能特性
- 高级“智能过滤器”(见下文),以及用户定义的 RegEx(正则表达式)过滤器;
- 拦截包含脏话的命令(通过可自定义的服务器列表);
- 在发生违规时应用各种操作(踢出、杀死、燃烧、封禁、取消管理员权限、发送消息,以及/或运行自定义服务器命令);
- 可选择封禁收到过多脏话违规行为的玩家(可配置),或应用一组自定义操作和命令;
- 如果玩家名称中包含已定义的脏话之一,可选择禁止其加入服务器(可配置;如果启用了此功能,您还可以提供一个排除检查的玩家名单);
- 能够将您自己的自定义词汇(规则)添加到列表中(使用正则表达式)。
目前有十一种内置的智能过滤器可供选择(您也可以定义自己的自定义过滤器;默认的 "filters.yml" 文件中包含十几个自定义过滤词汇,既作为示例,也作为额外的过滤词),这些过滤器不仅针对单词本身,还针对该单词的多种变体进行过滤。所有过滤器(自定义和内置)均不区分大小写,并自动考虑带重音字符的情况。 例如:
- 单词 "Duck" 可能会过滤:duck, duk, dvck, d*u*c*k, d uck, dűćķ, d\_/ck, ddddddduuuuuucccckkkkk 等。
- 单词 "Shot" 可能会过滤:shot, sh0t, $hot, s*h*o*t, s h o t;但不会过滤像 it's hot. 这样的短语。
- 单词 "All":可能会过滤:all, allhole ;-) 但不会过滤 call, ball, alloy 等单词。
- 同样,对于既可能是人名也可能是侮辱性词语的词(即 Dick),内置的智能过滤器会尝试判断其用法/意图并进行相应过滤。注意:由于包含此名称/词语的一些句子可能被解释为两种含义,在某些情况下,该过滤器可能无法正确识别负面用法(如果您希望对此情况采用更严格的过滤,可以定义自己的自定义过滤器)。
您还可以选择为任何一组词汇分配多少扣分(例如,更严重的词汇比不太贬义的词汇获得更多扣分)。
命令
- /yasf - 打印出用户当前的违规扣分数量。
- /yasf test <phrase> - [仅限管理员控制台] 允许您测试单词/短语是否匹配当前运行的脏话过滤器。
- /yasf player <playerName> - [仅限管理员控制台] 查询给定玩家当前的扣分数量。
- /yasf setplayer <playerName> <demeritCount> - [仅限管理员控制台] 设置给定玩家的扣分数量。
- /yasf reload - [仅限管理员控制台] 重新加载插件以及所有配置和规则更改。
配置
请参阅(编辑)filters.yml 文件以获取有关配置您自己的规则和过滤器的说明(默认设置对许多人来说已经足够)。
警告:"filters.yml" 文件包含冒犯性语言,因为所有需要过滤的脏话都在那里进行了配置。
安装方法
- 将 .jar 文件拖放到您的 plugins 文件夹中。
- 停止并重新启动服务器,或在服务器运行时 "/reload" 插件。初始过滤器默认值现在生效。
- 根据需要设置 "filters.yml" 文件(定义您自己的过滤器和/或使用内置的),并从服务器控制台键入 "yasf reload"(或使用 "/reload" 重新加载所有插件)以使新设置生效。
注意:要取消因说脏话过多而被自动封禁的玩家的封禁状态,您需要手动编辑 "warnings.yml" 文件。在玩家姓名旁边是他们当前的违规数量。将该数字重置或降低到低于封禁阈值的水平。
示例
默认的 "filters.yml" 文件包含有关如何创建规则、如何使用内置的智能过滤器、如何创建自定义过滤器(利用强大的“正则表达式”)以及如何定义采取的操作(包括定义您自己的自定义操作)的文档和示例。
另请参阅此页面以获取更多信息:Usage-Examples
请报告过滤器中的任何不准确之处,以便尽快更正。谢谢。
注意:此插件会将使用数据发送到 MCStats(参见:)。
YASF: Yet Another Swearing Filter
YASF is yet another swearing filter, which has advanced, built-in "Smart Filters" along with the ability to create your own custom Filters. YASF also allows you to choose which Actions to take when a violation is detected (kick, kill, burn, ban, deop, send a message to the player, and/or any number of custom server actions).
Features
- Advanced "Smart Filters" (see below), along with user-defined RegEx (regular expression) Filters;
- Blocks commands that contain swear words (via a server customizable list);
- Applies various actions when a violation occurs (kick, kill, burn, ban, deop, send message, and/or run custom server commands);
- Optionally bans players that receive too many swearing violations (configurable), or applies a set of custom actions and commands;
- Optionally bans players from joining the server if their name contains one of the defined swear words (configurable; you can also provide a list of players that are excluded from this check if this is enabled);
- Ability to add your own custom words (rules) to the list (using regular expressions).
Currently there are eleven built-in Smart Filters to choose from (you may define your own custom filters as well; a dozen custom filtered words are included in the default "filters.yml" file, both as examples and as additional words to filter on), which filter not only on the word itself but also on many variations of that word. All filters (custom and built-in) are case-insensitive and automatically take into account accented characters. For example:
- the word "Duck" might filter on: duck, duk, dvck, d*u*c*k, d uck, dűćķ, d\_/ck, ddddddduuuuuucccckkkkk, etc.
- the word "Shot" might filter on: shot, sh0t, $hot, s*h*o*t, s h o t; BUT NOT phrases like: it's hot.
- the word "All": might filter on: all, allhole ;-) BUT NOT words like: call, or ball, or alloy.
- similarly, for a word that could be both a person's name and also an offensive word depending on its usage (i.e., Dick), the built-in Smart Filter makes an attempt to determine the usage/intent and filter accordingly. Note: because some sentences with this name/word could be interpreted either way, there are situations where this filter won't correctly identify the negative usage (you can define your own custom filter if you prefer a more strict filter for this case).
You can also choose how many swearing de-merits should be given for any set of words (e.g., more severe words can receive more de-merits than less derogatory words).
Commands
- /yasf - prints out the user's current number of violation demerits.
- /yasf test <phrase> - [admin console only] allows you to test words/phrases against the currently running swear filters.
- /yasf player <playerName> - [admin console only] queries how many de-merits the given player currently has.
- /yasf setplayer <playerName> <demeritCount> - [admin console only] sets the number of de-merits for the given player.
- /yasf reload - [admin console only] reloads the plugin and all configuration and rule changes.
Configuration
See (edit) the filters.yml file for instructions on configuring your own Rules and Filters (the defaults may be fine for many people).
Warning: The "filters.yml" file contains offensive language, as all of the swear words to filter on are configured there.
How to Install
- Drag and drop the .jar file into your plugins folder.
- Stop and restart your server, or "/reload" the plugins while your server is running. The initial filter defaults are now active.
- Set up the "filters.yml" file however you want (define your own filters and/or use the built-in ones), and type "yasf reload" from the server console (or use "/reload" to reload all of the plugins) for the new settings to take effect.
Note: to unban someone that has been automatically banned from the server for too much swearing, you'll need to manually edit the "warnings.yml" file. Beside the players' names are the number of violations they currently have. Reset or lower that number to below the ban-threshold.
Examples
The default "filters.yml" file contains documentation and examples on how to create Rules, how to use the built-in smart filters, how to create your own custom filters (which utilize powerful "regular expressions"), and how to define what Actions to take (including defining your own custom actions).
See also this page for more information: Usage-Examples
Please report any inaccuracies in the filters so that they can be corrected as quickly as possible. Thanks.
Note: this plugin sends usage data to MCStats (see: ).
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
下载 YetAnotherSwearingFilter
版本 1.3.2
- 基于 Bukkit 1.6.4 Release 2.0 构建
- 从控制台输出中移除了调试日志消息
版本 1.3.1
- 添加了排除特定玩家被过滤的功能;你可以提供一份玩家名称列表,或者选择排除所有操作员不被过滤。这可以在 "filters.yml" 文件中配置如下:
playerExclusions:
- excludeOps: true
- excludedPlayers:
- samplePlayerName1
- samplePlayerName2
版本 1.3.0
- 对内置智能过滤器进行了增强(调整其中一些以提高准确性)。
- 新增用于重新加载插件及其规则配置的命令行指令:"yasf reload"。
- 现在可以搜索书籍编辑内容中的脏话。
- 新增内置过滤器关键词 ("ipaddress"),用于查找有效的 IPv4 地址(可能有助于发现服务器广告行为)。
- 新增过滤器动作:"ban"(封禁)和 "resetWarnings"(将用户的警告计数重置为零)。
- 当达到最大警告次数时,可以通过 "maxwarnings_actions" 自定义执行的动作(默认动作为自动封禁)。"maxwarnings_actions" 的配置方式与 "default_actions" 及规则中的 "actions" 相同。
版本 1.2.0
- 对内置智能过滤器进行了增强(调整其中一些以提高准确性)。
- 通过 filters.yml 文件中的 "blockplayers_exceptions:" 列表,添加了定义例外以允许某些玩家名称不被 "blockplayers:" 选项屏蔽的功能。
- 新增命令行指令 ("yasf setplayer <playerName> <demerits>") 用于显式设置指定玩家的劣迹点数。
版本 1.1.6
次要修复版本:
- 过滤条件中现在支持带重音的字符(在字符串比较时会自动去除重音,因为我们忽略重音字符;不过之前包含带重音字符的过滤条件无法正常工作)
- 部分词汇中添加了德语字符“ß”。
- 修复了某个内置过滤器错误地过滤某些词汇的问题。
版本 1.1.4
自版本 1.0.0 以来的更改:
- 你现在可以通过新的“cmd”操作配置任何用户自定义服务器命令,以便在违反规则时执行!
- 所有过滤器(智能过滤器和用户定义的 regexFilters)在进行匹配时现在会考虑带重音的字符(例如,“dűćķ”)。
- 对部分内置智能过滤器(以及默认的用户定义 regexFilters)增加了额外的单词/字母/符号组合检查。
- 新增控制台命令("yasf player <playerName>")用于查询指定玩家当前的扣分数量。
- 你现在可以禁用当玩家的扣分达到 maxwarnings 计数时自动封禁该玩家的功能(通过将 maxwarnings 设置为 0)。
- 一些错误修复和清理工作。
- 基于 CB 1.4.7-R1.0 编译并测试。
注意:虽然你现有的 filters.yaml 文件仍然可用,但新的默认 filters.yml 文件包含了一些额外的文档,描述了如何使用新的“cmd”操作,以及对预配置的 regexFilters 的一些额外调整。要使用新的默认 filters.yml 文件,只需删除你现有的 filters.yml 文件并重启/重新加载服务器(新的默认 filters.yml 文件将自动创建)。
初始版本 (1.0.0)
自 Beta 版本以来的更改:
- 在部分内置过滤器中增加了额外的检查(支持更多单词变体);
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
自定义你的Minecraft头像!
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
创建用户友好的菜单以前往不同的世界
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
评论 0
登录后参与评分
还没有评论,来抢沙发吧