From 8cb1b362eb718fa091b683f1ea5f49eea3cfbe14 Mon Sep 17 00:00:00 2001 From: Jofkos Date: Fri, 8 Apr 2016 17:01:22 +0200 Subject: [PATCH] Begin console output with ANSI line erase. --- .../bukkit/craftbukkit/util/TerminalConsoleWriterThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java index 772f730ffb..b640971130 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java @@ -7,6 +7,8 @@ import java.util.logging.Logger; import jline.console.ConsoleReader; import com.mojang.util.QueueLogAppender; import org.bukkit.craftbukkit.Main; +import org.fusesource.jansi.Ansi; +import org.fusesource.jansi.Ansi.Erase; public class TerminalConsoleWriterThread implements Runnable { final private ConsoleReader reader; @@ -29,7 +31,7 @@ public class TerminalConsoleWriterThread implements Runnable { try { if (Main.useJline) { - reader.print(ConsoleReader.RESET_LINE + ""); + reader.print(Ansi.ansi().eraseLine(Erase.ALL).toString() + ConsoleReader.RESET_LINE); reader.flush(); output.write(message.getBytes()); output.flush();