- Native Minecraft Version:
- Tested Minecraft Versions:
- Source Code:
Automatically respond to messages in chat or commands sent by users. ChatMonitor is a flexible configurable system allowing you to respond to any trigger and decide whether the matching message:
ChatMonitor allows you to define groups of words, each group with separate responses, replies, and options, all configurable in configuration files.
- Should be muted
- Should be responded to directly to the user or publically as a chat broadcast
- Cancelled, if it is part of an action
- Trigger further commands to the server, or to other plugins.
ChatMonitor automatically responds to input from players -- either a chat message or a triggered command -- with a configured response. As a result, the plugin can be used for various purposes, like:
Example #1: Responding to trigger "!rules" by broadcasting a message to the entire chat.
- Dealing with offensive language -- muting the message, sending a response to the user, and triggering a warning or ban command.
- Responding to keywords -- allowing the message through and responding with a broadcast response to the entire chat.
- Dealing with code of conduct violation -- responding to terms that indicate violation of the rules by muting the message, sending a warning to the user or general chat, or escalating by tiggering a followup command for warning or banning the user.
Example #2: Responding to an offensive word by muting the message, sending the user a note, and triggering a command for a ban-manager plugin.
Installaion and Configuration
To install the plugin, download the latest release and upload it to your server's "plugins" directory.
On the first run of the plugin, it will automatically create the base configuration files:
You should edit the list of words in the group file and provide your desired behavior within the config.
- config.yml - contains the lists of words. The first default instance will contain a single group called "list"
- ChatMonitor_wordgroup_[groupName].yml - contains the definition of the group of names including the trigger words and responses. The first default instance will produce the filename ChatMonitor_wordgroup_list.yml with an empty list of words.
If you wish to create more groups, you can add the group names to the list in config.yml and on reload, the individual group config files will be auto-created. Alternatively, you can create your own group configuration files by adding their group name to the list in the main config.yml and adding configuration files name ChatMonitor_wordgroup_[groupName].yml per each group.
See below for configuration options.
Note about initial operationPlease note that the plugin will not do anything "out of the box" without editing the initial configuration to add a list of words.
The example folder provides several lists to start your plugin with. Please feel free to use any and all -- do not forget to add the group name to your config.yml
CommandsThere are several commands available. These commands work both in-game and in the console.
Reloads configuration files and word lists without having to restart the server.Code (Text):/chatmonitor reload
Tests whether the given text will be caught by the configuration and word lists, and which of the wordlist groups caught it.Code (Text):/chatmonitor test (text)
Configuration optionsThere are several configuration options for both the main config.yml and the group config files:
Main configuration (config.yml)
- defaultmessage - Defines the fallback message in case a group does not have a message, or its message is empty.
- groups - A list of group names for your word lists. Requires at least one entry.
Group configuration (ChatMonitor_wordgroup_groupname.yml)Code (YAML):defaultmessage: "We don't allow this word here."
Defines the behavior per each grouping of words. One of those is mandatory for behavior, but you can also define multiple groups with different behaviors, prompts, and word lists.
- message - The message that will be displayed to the user
- preventsend - true/false - Dictates whether the triggering text (or command) are allowed to be sent. True would mute the message or cancel the command. False would let it continue processing.
- broadcast - true/false - Dictates whether the response (defined in the message field) is sent to the player specifically, or is broadcast to the chat as a whole.
- includecommands - A list of commands that the system should also look at for matches. Default includes 'tell'. Do not include any slashes.
- runcommands - A list of raw commands that will be triggered, one by one, in case that a player's message matches one of the words. These can be server commands or commands that trigger other plugins.
- words - a list of words to match in a chat or command. These are 'regular expressions', meaning that the input can include word-boundaries and relevant rules, or just the desired words for a total-match. Please make sure the entries in the list are surrounded by quotes; example: "!rules"
Note: Don't forget to reload the plugin after updating any of the config files.Code (YAML):message: "We don't allow this word (%word%) on this server!"
- "ban %player% you shouldn't have said that!"
For a base list of regular expressions covering most known offensive words in English, please see the plugin wiki. You are welcome to use that list as a base for your server's anti-swear group.
PermissionsThe plugin has several permissions:
Any player with that permission will never trigger any of the words from any group. By default, this permission is assigned to ops.
Players with this permission will be allowed to use the reload action.
Players with this permission will be allowed to use the test action.
More informationFor more information and for feature requests and bugs, please visit the plugin's GitHub page.
Servers running this plugin:
If your server is running this plugin, please notify me in a message, and I'll be happy to add it to the list!