If we say we have a chat filter rule using regex in the "rules" folder for "fuck" to be a banned word, you obviously can't type it. But if we allow the player to use color codes in chat, they can bypass it with those.
A simple solution to that would be to ChatColor.stripColors() the message before the check if the message contains banned regex.
If we say we have a chat filter rule using regex in the "rules" folder for "fuck" to be a banned word, you obviously can't type it. But if we allow the player to use color codes in chat, they can bypass it with those. A simple solution to that would be to ChatColor.stripColors() the message before the check if the message contains banned regex.