Releases: Jochyoua/MCSF
Minor update 5.1
I've been withholding this update for a while for testing but after loads of testing, I am finally happy with this update.
If you encounter any issues please let me know so I can fix them right away!
Changes
- the isclean method now requires Pattern value instead of using only utils#getSwears(), now it is possible to only filter global messages
- There is now a local cache of sizes for swears, whitelist, and global information. I now compare this to the raw file and if it differs, update
- Added possibility of only punishing players if they have flagged global filters
- Removed Sign Filtering Support
- Removed ability to disable whitelist checking, if you wish to have it disabled just set the whitelist list to be empty
- Player Only Filtering now relies upon recipients and is set to only be called last, to let all other plugins have first go
- Removed Custom Regex options in config, you may now add custom regex as you would a normal swear:
- To do this, you need to add a prefix like so: /mcsf add regex:REGEX or /mcsf global regex:REGEX
- This now means custom regex is now cross-server compatible
- PlaceholderAPI support! You can now use placeholders from PAPI in MCSF messages!
- Some placeholders have been added for other plugins to use, check the last bit in the README.md!
- Removed users option from config and it is now set into an SQLLite database.
- User data is now stored and managed in a new User class.
- This version has a huge revamp of the filtering methods, causing no delay from messages on my test server.
- This version now has the SQL data in a separate folder, so you can share the config.yml without sharing the credentials of MySQL aswell.
- This version adds the possibility of double filtering a string, if enabled strings will be filtered twice before returning to users.
- This prevents users from bypassing the filter by putting a swear inside of a swear E.G: sh shit it would return to user as sh **** it
- if this is enabled, it would be filtered and shown as sh **** it
Fixes:
- Fixed issue with globalSwears generating lag whenever filtering occurs (was creating new regex each time a word was cleaned)
- Fixed issue with book checks not globally filtering
- Made it so that custom regex could be globally filtered, though this will disallow the use of TYPE parameters
- Fixed issue with swears.yml appearing to be empty due to a variable being filled and checked before it finished
- Fixed issue with special characters and spaces not successfully being filtered in some cases
Notes
Enabling only player filtering strips all hovering and special effects added to that message. The only way to keep these is to use ProtocolLib and have Player only filtering disabled.
Major update 5.0
Be wary as this update is experimental-ish, if you encounter any issues please post an issue :)
Changes
- Made it so that all chat messages sent to discord are filtered and allowed WebhookChatMessage messages to be filtered
- Re-implemented the reload command
- Made it so that MCSF doesn't bypass event cancellations from other plugins when using only player filtering
- Added a global swear filter feature that lets you filter words despite the filter being on or off
- Also added a new feature tied in with this, save messaging that contains swears
- We now use HikariCP instead of MySQLAPI
- A new command was added, syntax: /MCSF parse (enabled_state) (string)
- This will parse all of the arguments after the enabled as a single message and will clean it as the player would see it
-
If you have the swear filter enabled and have the enabled_state as false (and have global filtering on) the message will be filtered no matter what
- Since this command is more debug based and very experimental, it will not be on the command list for some time
Fixes
- Modified some code to help with lag and code readability
- Fixed issue with whitelist removing removes from the swear list instead
- Fixed issue with the quote character not being escaped correctly causing issues with the ignoring special characters feature.
- Fixed issue with special characters not being filtered correctly in Signs
- Fixed issue with swear filter accidentally flagging whitelist UUID counter-parts as a blacklisted string.
- Fixed issue with only player filtering not being enabled if ProtocolLib chat filtering fails.
- Fixed issue with help command sending new line at the end of the help message
- Fixed issue with ProtocolLib global filtering's JSON messages being flagged as a blacklisted string.
- To counteract this issue, the following words have been disallowed to be blacklisted words: extra, text, italic, color, and every ChatColor enum value there is and those words have been forcefully added to the whitelist (if enabled)
Minor update 4.4
Changes
- Removed the reload command
- Removed the MCSF.dontfilterme permission
- Re-added custom connection string support and temporarily removed HikariCP due to some issues
- Custom connection string has been re-added in this update
- Option to filter the reverse of swears has been added, so if the user were to say "kcuf" it would be filtered.
- Special character ignoring filtering has also been added, it differs from the original regex but still functions the same.
- The only exception is that if you were to attempt to say "f_u_c_k" it would filter as "*******", or any combination of special characters you choose, you may add or remove any through settings.filtering.ignore special characters located in config
- Punishment commands have been modified so it's easier to read and has more functionality
Fixes
- Fixed issue with punishments being broken
- Fixed issue with update notification not showing in-game
- Fixed issue with isclean method flagging whitelisted words as swears and therefore firing punishment commands
Minor update 4.3
Changes
- I have modified the config so it's hopefully easier to read, some config settings have been moved
- I suggest removing the entire settings path and restarting, letting it generate freshly.
- Added possibility if using DiscordSRV, surround the swears in spoilers so if users wish to read them they may click on the spoiler.
- Format may be edited through settings.discordSRV.spoilers.format, by default it is ||{swear}||
- Made it so that swear special character escaping is now optional for DiscordSRV
- Moved settings.mysql to mysql.enabled
- ExpiringMaps is now being used to handle cooldowns, much easier to use :)
Fixes
- Fixed issue with the permission MCSF.dontfilterme being default to OP and must first be toggled through settings.allowfilterbypass
- Moved variables.punishment_commands to settings.filtering.punishments.commands
- Fixed issue with errors being thrown if a table was deleted after initial server start
Minor update 4.2
Changes:
- If you have the permission "MCSF.dontfilterme", (no one has this by default) messages will not be filtered for you.
- Hex RGB support added for variables, the format is &#RRGGBB
- Sign filtering is now relative to the player's view distance rather than the server's view distance which could be larger than that. Although, since this was recently added in 2018 if any errors were to occur because of it, it would default to the server's view distance instead.
- Re-translation of de_de.yml (Thank you Xirado)
- No longer requires ProtocolLib to be installed
- Without ProtocolLib although player chat will still be filtered, messages from other plugins will not.
Fixes
- Fixed issue with logging message with only_filter_player being sent for each player that's online
- Fixed issue with 1.8.8 not working due to bungee cord API message sending
- Fixed issue with reset command resetting whitelist data to blacklist data
- Fixed issue with duplicates attempting to be saved into databases
- Fixed issue with finding match results #3
Minor update 4.1
Changes:
- More language support! For more information please see update 4.0
- fr_fr (French)
- Modified help message so hopefully it is easier to read
- HikariCP / bStats / MariaDB drivers are shaded in with the jar
- At some point in time DiscordSRV events were removed and I'm not entirely sure when this happened but the mistake has been fixed in this update.
- Custom commands are now no longer supported as they cause issues (Mentioned below)
- HikariCP is now used alongside snippets of MySQL API
- Removed custom connection string
- PlayerJoinEvent, and PlayerQuitEvent are now both async
- Commands were modified so that they are no longer customizable which gives me the ability to have tab completions, sorry for the inconvenience.
- Commands are now also in async, so is the database management
- Debug now outputs messages to debug/log.txt if settings.debug is enabled
- Two new aliases have been added: as, antiswear
- Mentioned in previous updates, along with Containers taking priority Doors will also now take priority when right-clicking with a written book
- A little note: When only filtering players chat, the message is removed and only players would get the message, but now there's an option that console would get a message with the same format as the players would get, enabled by default settings.only_filter_players_console_log
- Added a whitelist feature (It is experimental, use with care!)
- Added whitelist command with one argument, the word; It works kind of how the vanilla whitelist command works as there is no add/remove option
- If class were in the whitelist list and a player were to say ass, the filter would not count class as ass and refuse to filter that word
- This works for all filtering methods, though this is pretty experimental at the moment so tread with caution!
- This is saved into MySQL so you can whitelist words across servers
- This also has given me the opportunity to say that certain word combinations might trigger the swear filter such as "what wat", as the swear filter will think it is the player trying to say twat, which is in the original swear list, whitelist the word "wat" and this will stop, or the word "what"
Fixes:
- Fixed issue with only the set language file being generated
- Fixed issue with unset command sending messages to Console instead of the player
- Fixed issue with getLanguage() method being refreshed each time it's called
- Fixed issue with after unsetting every user an error would occur if anyone attempted to toggle their filter status
Major update 4.0
Changes:
- Modified config extensively
- Placeholders have been changed from %placeholder% to {placeholder} for ease
- Placeholders that use %placeholder% should still be recognized but future references will be with { and }
- Placeholders have been changed from %placeholder% to {placeholder} for ease
- Now supports multiple languages, all variables/messages are now moved to the locales folder.
- Available languages are English, German, and Spanish.
- You can change the language by modifying settings.language and setting it to one of the following:
- en_us.yml (English)
- de_de.yml (German)
- es_es.yml (Spanish)
- I plan to add support for more languages
- Metrics has been updated and now includes used language
- I apologize if these aren't accurate translations, I have limited resources when it comes to this :)
- You can now modify the MySQL connection string, it has the following placeholders:
- {host}: hostname defined in config
- {port}: port defined in config
- {database}: database defined in config
- {unicode}: whether or not to use Unicode (defined in config)
- {ssl}: whether or not to use SSL (defined in config)
- You now have the ability to add custom regex, two have already been added.
- To enable this set custom_regex.enabled to true (disabled by default):
- The first custom regex removes IP addresses and the second removes Domains
- The valid types are BOOKS, SIGNS, PLAYERS and ALL
- BOOKS only applies to books
- SIGNS only applies to signs but requires settings.signcheck to be true
- PLAYERS only applies to players but require settings.only_filter_players to be true
- ALL filters everything it can
- To enable this set custom_regex.enabled to true (disabled by default):
Fixes:
- Fixed API-version
- Fixed issue with placeholders being improperly called
Minor update 3.5
Hi thanks for deciding to use my plugin, just wanted to say something before the formalities :)
If you have any issues don't be afraid to let me know, I love squashing bugs :)
This version supports 1.16.1!
Changelog:
- Added an optional cooldown for every MCSF related command to prevent abuse of features
- Enabled by default; Any player without the MCSF.bypass permission will not be able to use any MCSF command for 5 seconds
- To disable this feature, simply set settings.cooldown to 0
- Cooldown data is saved per config file and will remain after restarts.
- Enabled by default; Any player without the MCSF.bypass permission will not be able to use any MCSF command for 5 seconds
- Modified settings.replace_word_for_word
- I have made it possible to replace certain words with another word, depending on the word
- replacements.all defaults to what variables.replacement is, an example below:
- so if the second word is filtered it would replace with "A really bad word!"
- Specific words are filtered first, and if nothing matches what's left it resorts to replacements.ALL or settings.replacements if variables.all does not exist
- Adds the ability to cancel messages if they contain swears
- Only works if settings.only_filter_players is true
- Enable it through settings.remove_message_on_swear, default is false.
- You can now toggle or view the status of players by using UUID only
- AsyncPlayerChatEvent filtering is returned if the event is canceled by another plugin
Fixes:
- Fixed issue with settings.force stopping player names from being saved to config
- Fixed issue with unset command only sending messages to console instead of the sender
- Fixed issue with SignCheck not stripping colors
- Fixed issue with SignCheck regarding filtering blank or clean signs (perhaps made it less laggy?)
- Made chunk checking asynchronous
Minor update 3.4
Hi thanks for deciding to use my plugin, just wanted to say something before the formalities :)
If you have any issues don't be afraid to let me know, I love squashing bugs
Changelog:
- PlayerChatEvent -> AsyncPlayerChatEvent, no more deprecation! Yay!
- Option to filter only player chat so server/plugin messages are no longer being filtered
- This is experimental at the moment but it should work fine, please let me know if any issues arise
- Enabling this makes private messages sent to the player unfiltered but publically sent messages are filtered.
- This has the added benefit of not requiring ProtocolLib for message filtering, but still depends on it being installed.
- This is because Sign checking requires ProtocolLib
- Enable this through settings.only_filter_players
- Split main class into separate packages so it's easier to navigate now
- When book check is enabled, most containers would open first when holding written books
- Added option to replace strings word for word
- Enable this through settings.replace_word_for_word (default: false)
- If you set variables.replacement as "Test" all swears would be replaced by "Test" if settings.replace_word_for_word is true
- variables.console_motd and variables.help now are being sent as one message instead of multiple.
- Added command 'unset' to remove specific or all users from the database/config
- /mcsf unset all removes all users from the config/database
- /mcsf unset [player/uuid] removes that specific user from the config/database
- Permission to use is MCSF.modify
Fixes:
- Fixed issue where clean method testing added onto the swear count
- (1.8) fixed an issue where variables.error.unsupported would stop other messages from being fired
- Fixed an issue where the does not exist variable (for removing via config) was misnamed for non-MySQL usage
- Fixed an issue with console_motd plugin-version returning latest version rather than current
- Longer swears would be filtered first, so if you have "Fuck" but you also want to filter "Fucking" without "ing" being shown, it'll filter that as well. (Must have "fucking" in the swear list too)
- Removed spaces between some words in the default swear list and now regex removes all spaces from any string from the swear list because spaces will mess up the filtering process
Minor update 3.3
Changes:
- Shortened the time it takes to filter a string
- Modified isclean method so it returns true if a string contains blacklisted words
- This only affects settings.experimental_regex, return value stays the same otherwise
- New console_motd provides console with plugin data
- You may disable this through settings.console_motd or modify it through variables.console_motd
- New swear count config addition, counts the number of times swears have been filtered
- Debug option added in the config, slipped my mind the last update
- You can modify this through settings.debug (disabled by default)
- Debug strings aren't modifiable since they contain some useful information that only the console would see
- Punish players who swear with any command!
- This requires both settings.force and settings.punish_players to be true
- MCSF.bypass allows users to not be punished
- Fixed an issue where DiscordSRV messages were being affected by italics and underscores.
- Until I find a way to filter experimental webhook messages for DiscordSRV, they will remain unfiltered
- In-game update notifications on join whenever there is a new update
- Permission to receive updates is MCSF.update
- Disable this under settings.update_notification_ingame, default is true
Notes
Hi thank you for using my plugin, I just wanted to ask you that if you come across any issues please message me or post them through the issues portion of this repository.
Once I feel that the experimental regex is stable enough, I'm going to remove the setting option and make the regex portion the only method to filter strings.
Thank you for your continued support.