diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch new file mode 100644 index 0000000000..bdce3205fc --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/server/gui/MinecraftServerGui.java ++++ b/net/minecraft/server/gui/MinecraftServerGui.java +@@ -151,6 +166,7 @@ + this.finalizers.forEach(Runnable::run); + } + ++ private static final java.util.regex.Pattern ANSI = java.util.regex.Pattern.compile("\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})*)?[m|K]"); // CraftBukkit + public void print(JTextArea textArea, JScrollPane scrollPane, String line) { + if (!SwingUtilities.isEventDispatchThread()) { + SwingUtilities.invokeLater(() -> this.print(textArea, scrollPane, line)); +@@ -164,8 +182,9 @@ + } + + try { +- document.insertString(document.getLength(), line, null); +- } catch (BadLocationException var8) { ++ document.insertString(document.getLength(), ANSI.matcher(line).replaceAll(""), (AttributeSet) null); // CraftBukkit ++ } catch (BadLocationException badlocationexception) { ++ ; + } + + if (flag) { |