From 596a4e422e63099939f05e6993edaea169a4ebfb Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sat, 17 Dec 2016 15:26:01 -0500 Subject: [PATCH] fixing my fix again, more typos - ChatProcessing --- .../buttondevteam/chat/ChatProcessing.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/main/java/buttondevteam/chat/ChatProcessing.java b/src/main/java/buttondevteam/chat/ChatProcessing.java index 63dbcad..412fc38 100644 --- a/src/main/java/buttondevteam/chat/ChatProcessing.java +++ b/src/main/java/buttondevteam/chat/ChatProcessing.java @@ -122,20 +122,25 @@ public class ChatProcessing { namesb.append(")"); StringBuilder nicksb = new StringBuilder(); nicksb.append("(?i)("); - final int size = PluginMain.GetPlayers().size(); - for (int i = 0; i < size; i++) { - final String nick = PlayerListener.nicknames.inverse().get(p.getUniqueId()); + final int size = PluginMain.GetPlayers().size(); + int index = 0; + for (Player p : PluginMain.GetPlayers()) + { + final String nick = PlayerListener.nicknames.inverse().get(p.getUniqueId()); if (nick != null) { - nicksb.append(nick); - if (i < size - 1) - { - nicksb.append("|"); - } + nicksb.append(nick); + if (index < size - 1) + { + nicksb.append("|"); + } } + index++; + } + nicksb.append(")"); } - nicksb.append(")"); + formatters .add(new ChatFormatterBuilder().setRegex(Pattern.compile("null")).setColor(Color.DarkRed).build()); // Properly added a bug as a feature