mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
19 lines
856 B
Diff
19 lines
856 B
Diff
--- a/net/minecraft/server/ServerGUI.java
|
|
+++ b/net/minecraft/server/ServerGUI.java
|
|
@@ -158,6 +158,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(() -> {
|
|
@@ -173,7 +174,7 @@
|
|
}
|
|
|
|
try {
|
|
- document.insertString(document.getLength(), s, (AttributeSet) null);
|
|
+ document.insertString(document.getLength(), ANSI.matcher(s).replaceAll(""), (AttributeSet) null); // CraftBukkit
|
|
} catch (BadLocationException badlocationexception) {
|
|
;
|
|
}
|