Detoxify
Detoxify your chat like a pro!
How does it work?
Detoxify is powered by an extremely low powered (less than 150MB in ram!) yet very performant AI called ``detoxify`` (hence the name!) that's main goal is to classify messages into several categories. These categories are what allow you to finely adjust what exactly gets caught by the filter and what not!
How to use - Server
Simply download the correct version, put the jar into your plugins folder and you're off to the races!
The config should be loaded into plugins/Detoxify
Configuration Options
This config is the same for both the client and server!
Code (Text):
# This enables the following:
# 1. How long it takes to compute the message
# 2. The exact values each message triggers
# The second thing is extremely useful for fine tuning your values below
debug {
enabled = false
}
# The messages for each type of player!
messages {
player = "§cYour message was removed for violating chat rules."
staff = "%s's message has been removed [%s]"
console = "%s's message has been removed [%s]"
}
# The categories that the AI provides with classification
values {
toxicity = 0.9
severe-toxicity = 0.5
obscene = 0.25
threat = -1
insult = -1
identity-attack = -1
}
Skript Support
When creating this project originally I had a friend test it out and they couldn't get it to work with their custom Skript for chat, and so I added Skript support!
For Skript there is simply one expression available and can be used in either of these ways:
Code (Text):
is [the] %string% toxic
detoxify %string%
This will return a true or false value of whether the message is toxic or not!
Examples
Code (Text):
on chat:
if detoxify message is true:
cancel event
send "&cThat message was blocked for toxicity!" to player
Code (Text):
on chat:
if is the message toxic is true:
cancel event
send "&cThat message was blocked for toxicity!" to player