Avoid doing expensive regex matching in colorCheck

This commit is contained in:
Evenprime 2012-03-04 17:31:13 +01:00
parent e33fafd11a
commit 10d76d1a22

View File

@ -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);