CensorIt
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 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 http://dictionary.cambridge.org/ 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 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- Initial release
@KAGamerAlex
Why not try it?
Is this working with 1.2.3-R0.1?
I wish CensorIt and Badwords could be combined so I could have CensorIt's filter abilities and dictionary check, and BadWords' warning, kick, and ban features.
http://dev.bukkit.org/server-mods/badwords/
@Technius
Try v0.2 and tell me if it works. I didn't get any errors starting server but I didn't login to server to test it. It worked on 1.1 R6
@Alvarez96
Source is in the jar, you can use winrar to extract it. There's also a version a little older on my github, the only difference is the new listeners system. https://github.com/ZachBora/CensorIt
@zachbora
Thanks!
Can we get source code please?
@Technius
I'll get an update tonight.
I'd like a 1.2 update... Many people like to swear on my server(including me).
@zachbora
replacement.txt doesn't appear to function...
Could you make it possible so you can define what words are replaced with what replacement?
@zachbora
Thanks. I'll report here for errors.
@KAGamerAlex
It should, I use it on 1.1 R1
Is this working for 1.1-R3?
@sheepwool7
Bukkit doesn't have 2 chats. Another plugin could implement that with the API.
Can you make two chats, one for no censor and one for censor, then block the people who don't/do want to see either chat.
Yay for incoherent ideas!
@sheepwool7
It's in the Things to do and I don't know any way to do it without breaking other chat plugins. One does not simply remove the censor.
To make the censoring on or off for different persons, I need to remove the chat sent event and handle it myself, but that will break every plugin that changes chat. At least it's what I think.
Is there any way where a player can opt to see bad words, and toggle seeing them and not seeing them? <- badly worded, I know...
Thank you sir for this plugin. I can barely keep up with the server bills, but when I can donate, you are on my list!