diff options
author | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
commit | bee74680e607c2e29b038329f62181238911cd83 (patch) | |
tree | 708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-spigotflower-stripped/net/minecraft/server/gui | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-bee74680e607c2e29b038329f62181238911cd83.tar.gz Paper-bee74680e607c2e29b038329f62181238911cd83.zip |
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/gui')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch new file mode 100644 index 0000000000..107e690cde --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/gui/MinecraftServerGui.java.patch @@ -0,0 +1,21 @@ +--- a/net/minecraft/server/gui/MinecraftServerGui.java ++++ b/net/minecraft/server/gui/MinecraftServerGui.java +@@ -168,7 +166,8 @@ + this.finalizers.forEach(Runnable::run); + } + +- public void print(JTextArea jtextarea, JScrollPane jscrollpane, String s) { ++ 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(jtextarea, jscrollpane, s); +@@ -183,7 +182,7 @@ + } + + try { +- document.insertString(document.getLength(), s, (AttributeSet) null); ++ document.insertString(document.getLength(), ANSI.matcher(line).replaceAll(""), (AttributeSet) null); // CraftBukkit + } catch (BadLocationException badlocationexception) { + ; + } |