mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-28 03:17:53 +01:00
Avoid doing expensive regex matching in colorCheck
This commit is contained in:
parent
e33fafd11a
commit
10d76d1a22
@ -14,7 +14,7 @@ public class ColorCheck extends ChatCheck {
|
||||
|
||||
public boolean check(NoCheatPlayer player, ChatData data, ChatConfig cc) {
|
||||
|
||||
if(data.message.matches(".*\247.*")) {
|
||||
if(data.message.contains("\247")) {
|
||||
|
||||
data.colorVL += 1;
|
||||
incrementStatistics(player, Id.CHAT_COLOR, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user