-
Notifications
You must be signed in to change notification settings - Fork 4
Removing Profanity
xqwtxon edited this page Aug 23, 2023
·
1 revision
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 @ReinfyTeam ❤️