如何使用 Samkio 和 Torrent 制作的视频
厌倦了有人在你的服务器上骂人,阅读他们幼稚的留言或对你家人的侮辱吗?
不用再找了!
CensorIt 正是为你打造的插件。
CensorIt 经过专门设计,旨在移除不想要的词汇,无论它们如何拼写——无论是包含特殊字符、重复字符、空格还是大写!
该插件包含一个被屏蔽词汇列表和一个允许词汇列表。这样你就可以只屏蔽
ass 而不屏蔽
glass, assassin, grass 等词。你只需添加小写的正常单词形式即可。例如,如果你只屏蔽
ass,插件会自动防止
ass, AsS, @$$, a ss, a.ss, a s s 或
a_s_s 等变体出现。
该插件还具有学习功能,可以在线验证单词是否存在,并自动将其添加到允许列表中。起初这会稍微降低屏蔽速度,但随着单词自动添加到允许列表,速度会逐渐提升。
该插件还包含一个
公共 API,其他
插件 可以利用它来屏蔽涉及文本的各种内容,如告示牌、私语、喊话(这些功能未包含在此简单插件中)。
安装
- 获取 CraftBukkit 的最新推荐构建版 在这里。
- 下载 CensorIt.jar 文件并将其放入你的 Plugins 子文件夹中
- 启动服务器一次然后停止。
- 进入 Plugins\CensorIt 文件夹
- 打开 censored.txt 文件并添加你想要屏蔽的单词。建议在 Notepad++ 中修改这些文件。
- 可选:打开 allowed.txt 文件并添加你希望不被屏蔽的单词。(例如 assassin, grass, glass)
- 可选:打开 replacement.txt 文件并添加当 /censorit replaceon 激活时用作替换词的单词。(例如 cloud, hug, happy)
- 启动你的服务器
命令
通用命令(需要
CensorIt.word 和/或
CensorIt.admin 权限)
- /censorit config - 列出配置命令。
- /censorit word - 列出单词管理命令。
CensorIt.admin 命令
- /censorit enable - 全局启用屏蔽。
- /censorit disable - 全局禁用屏蔽。
- /censorit reload - 重新加载配置。
- /censorit verify - 慢速!在线验证单词(添加到允许列表)。目前使用 词典。其他插件可以通过 API 更改此属性。
- /censorit unverify - 停止在线验证单词。
- /censorit replaceon - 启用单词替换(例如 bird, flower)。
- /censorit replaceoff - 禁用单词替换。
CensorIt.word 命令
- /censorit censor|uncensor - 屏蔽或取消屏蔽一个单词。(例如 ass, fuck)
- /censorit allow|unallow - 允许或取消允许一个单词。(例如 grass, assassin)
- /censorit replace|unreplace - 添加或删除替换词。(例如 bird, flower)
如何从你的插件连接至 API
- 添加对 CensorIt.jar 的外部引用
- 修改你的 onEnable 事件以检查 CensorIt 插件是否存在,如下所示:getServer().getPluginManager().isPluginEnabled("CensorIt")
- 在你想要使用 API 的类中,导入 com.worldcretornica.censorit.CensorItAPI
- 你不需要实例化 API,它是一个静态类,并且与其他插件共享相同的配置。只需输入 CensorItAPI.something 即可查看可用命令列表。
- 基本用法:使用函数 CensorItAPI.censor(string) 来获取被屏蔽后的字符串
待办事项
- 保存屏蔽状态配置:验证、启用、替换单词。目前仅保存单词列表。
- 添加选项以着色被屏蔽的单词/替换单词。
- 如果可能,需要找到一种方法来禁用当前玩家的屏蔽。最好的方法是留给其他插件实现。如果有人有关于如何在不断开其他插件的情况下实现此功能的建议,请告诉我。
- 检查将 8 用作 b 以及 () 用作 o 的情况
- 修复与 SpamHammer 的不兼容性问题。出于某种原因,被屏蔽的文本不计为垃圾信息
- 添加屏蔽 IP 的选项
- 添加对其他字符集的支持(例如俄语)。我原以为它们已经能正常工作,但有人告知并非如此。
更新日志
版本 0.1
How to use video by Samkio and Torrent
Tired of people cursing on your server and reading their immature messages or what they think of your family?
Search no more!
CensorIt is the plugin for you.
CensorIt has been specifically designed to remove unwanted words no matter how they are spelt, let it be with special characters, repeated characters, spaces or capitals!
The plugin contains a list of censored words and a list of allowed words. This way you can censor for example
ass without censoring
glass, assassin, grass, etc. You only need to add the normal form of the word in lower case. For example if you censor only
ass, the plugin takes care of preventing
ass, AsS, @$$, a ss, a.ss, a s s or
a_s_s.
The plugin also has a learning function with which verifies online for the existence of a word and automatically adds them to the allowed list. It makes censoring a little slower at first, but as words are added automatically to the allowed lists it will become faster.
The plugin also contains a
public API which can be used by
Other plugins to censor many different things involving text like signs, whispers, shouts (these features are not included in this simple plugin).
Installation
- Get the latest recommended build of CraftBukkit here.
- Download file CensorIt.jar and place it in your Plugins subfolder
- Start the server once and stop it.
- Go in folder Plugins\CensorIt
- Open file censored.txt and add the words that you want to censor. It is suggested to modify these files in Notepad++.
- Optional : Open file allowed.txt and add the words that you want to prevent from being censored. (e.g. assassin, grass, glass)
- Optional : Open file replacement.txt and add the words that you want to use as replacement words when /censorit replaceon is active. (e.g. cloud, hug, happy)
- Start your server
Commands
General commands (require
CensorIt.word and/or
CensorIt.admin permissions)
- /censorit config - List configuration commands.
- /censorit word - List word management commands.
CensorIt.admin commands
- /censorit enable - Server-wide enable censoring.
- /censorit disable - Server-wide disable censoring.
- /censorit reload - Reload configuration.
- /censorit verify - SLOW! Verify words online (added to allowed list). Currently using dictionary. Other plugins can change this property through the API.
- /censorit unverify - Stop verifying words online.
- /censorit replaceon - Enable word replacement (e.g. bird, flower).
- /censorit replaceoff - Disable word replacement.
CensorIt.word commands
- /censorit censor|uncensor - Censor or uncensor a word. (e.g. ass, fuck)
- /censorit allow|unallow - Allow or unallow a word. (e.g. grass, assassin)
- /censorit replace|unreplace - Add or remove a replacement word. (e.g. bird, flower)
How to connect to the API from your plugin
- Add an external reference to CensorIt.jar
- Modify your onEnable event to verify if the CensorIt plugin is present like so : getServer().getPluginManager().isPluginEnabled("CensorIt")
- In the class you want to use the API in, import com.worldcretornica.censorit.CensorItAPI
- You do not need to instantiate the API, it is a static class and contains the same configuration as other plugins. Just type CensorItAPI.something to get the list of available commands.
- Basic usage : use the function CensorItAPI.censor(string) to receive the string censored
Things to do
- Save the censoring state configurations : verify, enabled, replace words. Currently only the word lists are saved.
- Add option to color censored words/replacement words.
- If possible, need to find a way to disable censoring for the current player. Best would be to leave this to other plugins to implement. If someone has a suggestion on how to implement this without breaking other plugins please tell me how.
- Check for 8 used as a b and () used as an o
- Fix incompatibility with SpamHammer. Censored text don't count as spam for some reason
- Put option to censor IPs
- Add other charset support (e.g. russia). I thought they would already work but I've been told otherwise.
Changelog
Version 0.1
评论 0
登录后参与评分
还没有评论,来抢沙发吧