From 119f35b690d6e198f68775b917d8382b8293df20 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Fri, 6 Mar 2020 15:44:49 -0600 Subject: [PATCH] Fix chat getting cut off (Closes #188) --- .../java/org/geysermc/connector/utils/MessageUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java index 00dc9836..a47d013d 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java @@ -164,7 +164,7 @@ public class MessageUtils { } private static String getFormat(List formats) { - String str = ""; + StringBuilder str = new StringBuilder(); for (ChatFormat cf : formats) { String base = "\u00a7"; switch (cf) { @@ -184,13 +184,13 @@ public class MessageUtils { base += "o"; break; default: - break; + return ""; } - str += base; + str.append(base); } - return str; + return str.toString(); } public static boolean isMessage(String text) {