Compiled regex is faster.

This commit is contained in:
KHobbits 2012-01-18 23:35:30 +00:00
parent 36bc1adf83
commit a10f6850e5
5 changed files with 19 additions and 8 deletions

View file

@ -34,7 +34,7 @@ public class Commandr extends EssentialsCommand
User user = ess.getUser(sender);
if (user.isAuthorized("essentials.msg.color"))
{
message = message.replaceAll("&([0-9a-fk])", "§$1");
message = Util.replaceColor(message);
}
else
{
@ -45,7 +45,7 @@ public class Commandr extends EssentialsCommand
}
else
{
message = message.replaceAll("&([0-9a-fk])", "§$1");
message = Util.replaceColor(message);
replyTo = Console.getConsoleReplyTo();
senderName = Console.NAME;
}