Currently on the server it seems that most of the charspam is either accidental or from people who do not know the rules. It seems most of this charspam could be avoided by having a chat feature that shortens any charspam to 5 characters automatically. for example, if a player types "uhmmmmmmmm", it could automatically shorten it to "uhmmmmm". The shortened message has the same intent as the original but is no longer charspam. If this is not feasible then I would suggest just blocking the message telling people that charspam is not allowed similar to how ips and websites ae handled.
There might be too many possibilities to make it work but I'm not sure. Also spam can still be like just "hhhhhh", I think so it only solves part of the problem, might not be worth it imo.
While this is a good idea it seems like it would be difficult to program. I've seen something like this on discord bots before and it would sometimes trigger on long words ¯\_(ツ)_/¯. So while it's a good idea I'm not sure how feasible it is.
It sounded easy to code to me but just saying that with no backing seemed pointless, so I made a plugin that shortens any character spam to 5 characters. This is my first ever plugin though so I wouldn't recommend actually adding it to PF lol. SaberSupe/CharSpamnt: Spigot plugin to automatically reduce character spam (github.com)