[1.13 - 1.15.2] SafeChat

SafeChat

“Keep your chat safe!”


This plugin currently provides the following features , all aim towards protecting your chat from dangerous content:

  1. IPv4 addresses check (blacklist & whitelist)
  2. IPv6 addresses check (in work)
  3. Domains check (blacklist & whitelist)
  4. Words blacklist
  5. Words replacement
  6. Per check warning messages
  7. Per check hover messages
  8. Per check executables
  9. Different databases support
  10. Auto-Save feature
  11. Real time checks\config.yml reloading
  12. Console logging
  13. Config comments explanations


This check uses a high performance RegEx to check and match any blacklisted IPv4 inside chat messages.
If you want to allow any specific IPv4 address to not trigger this check you can simply add them in the addresses.whitelisted section from the config.yml.
NOTE: Both the blacklist and whitelist sections of this check support and use RegEx.
This check can be disabled


This check uses a high performance RegEx to check and match any domain inside chat messages.
To avoid possible plugin’s permissions accidentally matching in the chat, at the end of the RegEx all major TLDs have to be specified by hand.
All the major ones are there, but if you desire to insert some other specific ones, you can simply add them from the domains.regex section.
This check can be disabled


This plugin uses a smart system to automatically find forbidden words, and block them , or even better replace them!
Taking the advantage of the great power of RegEx you can create a custom check to match a word\a specific part of the word and specify a replacement for the found match;
you can also write ‘NONE’ as a replacement to only cancel the message. The config comes with 3 pre-made samples, so you can better understand how this works:

words


Every check that has been previously listed, has a warning message section.
This section contains a list of messages that will be sent to the player upon failing any of the chat checks.
They currently support the %PLAYER% placeholder, which will get replaced with the player’s username.
The plugin also supports color codes by using the & placeholder.

You can find a list of color codes here: https://www.digminecraft.com/lists/color_list_pc.php

NOTE: if you desire to not send any message, you can use a YAML empty array (this -> []).


Every check that has been previously listed, also has a warning message section right below the message one.
This section contains a list of messages that will be added to the current message as Hover text.
What does that mean?

When your mouse will hover on the warning messages, the text written in the hover message section will be displayed to the user!
They currently support the %PLAYER% placeholder, which will get replaced with the player’s username.
The plugin also supports color codes by using the & placeholder (same as warning messages).

NOTE: if you desire to not send any message, you can use a YAML empty array (this -> []).

You also can’t have a hover specified if the warning message is empty (it doesn’t make sense, right?)!

Every check that has been previously listed, also has a section named executables, right in the bottom of the check.
This feature allows you to specify a custom list of commands that shall be executed at a given number of check flags.

Every executable object has a list of commands in the executables.commands that support the %PLAYER% placeholder.
You can specify the number of flags required to trigger the commands in the executables.flags section.


At the beginning of the config.yml file, you will find a databaseX section, which is really important, because it allows you to specify your preferred databaseX type.
This plugin uses databases in order to store player flags, the default one is SQLite which will generate a local databaseX into the plugin’s folder.

There also is support for other databases, such as:

  • MySQL
  • MariaDB
  • Others… (coming soon)

In order to properly use any of these you’ll need to configure the databaseX access and credentials sections.
You’ll need first to specify the preferred DB type , then you need to edit the username, password, port, address, and databaseX fields, and you will be ready to go!

This plugin has a great feature that allows you to modify and update the values from the config.yml at any time.
In order to achieve this you can use the /safechat reload command, either from console or in-game. This will update every value, checks included.

This is really useful as it allows you to enable\disable checks, or modify them to your liking without restarting the whole server.

This feature comes disabled by default, however you can set this to true from the config.yml file.
What this does is enabling a basic logging info for failed checks. Every check , when failed will send a message to the console with the player and the name of the failed check.

This plugin comes with in-game or console commands in order to help the users read their data.
Every command starts with safechat and can be used from both console and in-game.

commands

  • sql search

    - This command allows you to search for a specific player and get his current flags.

    You can use this syntax in order to retrieve a specific flag count from the player

    - Usage: /safechat search <player> [ipv4|domains|words]

    You can user this other syntax to get all flags from the player

    - Usage: /safechat search <player>

    Imgur
  • sql top

    - This comand allows you to get a list of the user with the highest count of the specified flag

    - Usage: /safechat top <number> [ipv4|domains|words]

    Imgur
  • clear

    - This commands allows you to clear a specific flag count or all the flags of a player

    - Usage: /safechat clear <player>

    - This command allows you to clear all data of a player

    - Usage: /safechat clear <player> [ipv4|domains|words]

    clear

  • GUIs [Priority: LOW]
  • Clear player data [DONE]
  • More databases support [Priority: LOW]
  • 1.16 RGB support [Priority: LOW]


This plugin’s configuration will be automatically generated in your server inside the SafeChat/ folder.
The file is called config.yml and contains important settings that allow you to modify your plugin checks:


You can report any issue on this plugin issues page , remember to provide these essentials info that will help me provide help:

  • If you have any console error, please paste it on a website (such as pastebin, hastebin etc…)
  • Remember to specify your minecraft server version and fork name
  • Remember to specify the JVM version of your server
  • Be polite


This project is under the “GNU AFFERO GENERAL PUBLIC LICENSE”, a copy of the license is given inside the current repository.


This section is going to be written soon.


Thank you , TheViperShow.

DIscord link dont work and i don’t see a download link?

Im new to paper and just wanted to try it out :confused: