13
0
geforkt von Mirrors/Paper

20 Zeilen
864 B
Diff

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/server/gui/ServerGUI.java
+++ b/net/minecraft/server/gui/ServerGUI.java
@@ -160,6 +160,7 @@
this.e.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 a(JTextArea jtextarea, JScrollPane jscrollpane, String s) {
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(() -> {
2021-03-16 09:00:00 +11:00
@@ -175,7 +176,7 @@
}
try {
- document.insertString(document.getLength(), s, (AttributeSet) null);
+ document.insertString(document.getLength(), ANSI.matcher(s).replaceAll(""), (AttributeSet) null); // CraftBukkit
} catch (BadLocationException badlocationexception) {
;
}