This repository was archived by the owner on Jul 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Removing Profanity
Ace Sobremont edited this page Jun 29, 2022
·
2 revisions
Well, you can now remove profanity message and replace it like **** characters. Simplify of it.
PluginAPI::removeProfanity(string $message, array $words);
public function onChat(PlayerChatEvent $ev) :void {
$message = $ev->getMessage();
$words = ["your-word", "another-word"];
if(PluginAPI::detectProfanity($message, $words)){
$ev->setMessage(PluginAPI::removeProfanity($message, $words)); // example: your-word as ********* characters.
}
}
So, it will removes the profanity words and replace them *
characters as blocking them.
This plugin was made by @xqwtxon