This command would basically act as a censor bar because recently i have seen a few players complaining about people swearing and even though its allowed they should have a command to censor out swearing. it would basically either cut out the word entirely with ------s or make it a more family friendly word/
Mineplex (excuse my language) uses something similar to this, they have it so when someone swears it says the first letter then replaces the rest of the word with *'s, and you can easily turn that off with some sort of command.