From 02f595b109894c82cc6762389b3ecf1cc345b777 Mon Sep 17 00:00:00 2001 From: David Scandurra Date: Thu, 12 Oct 2023 23:03:18 +0200 Subject: [PATCH] ChatUtil: Append unwritten formatting in prefix mode --- .../main/java/com/viaversion/viabackwards/utils/ChatUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/src/main/java/com/viaversion/viabackwards/utils/ChatUtil.java b/common/src/main/java/com/viaversion/viabackwards/utils/ChatUtil.java index 57df9063..f7f5c7d4 100644 --- a/common/src/main/java/com/viaversion/viabackwards/utils/ChatUtil.java +++ b/common/src/main/java/com/viaversion/viabackwards/utils/ChatUtil.java @@ -128,6 +128,9 @@ public class ChatUtil { current = legacy.charAt(++i); lastState.processNextControlChar(current); } + if (isPrefix && !lastState.equals(builderState)) { + lastState.appendTo(builder); + } return builder.toString(); } }