From 16f5b6991cd30d897a2f43960a7a9132d5c8d94f Mon Sep 17 00:00:00 2001
From: CraftBukkit/Spigot <noreply+git-craftbukkit@papermc.io>
Date: Wed, 9 Mar 2011 23:34:26 +0000
Subject: [PATCH] Attempt to fix console crash

By: Dinnerbone <dinnerbone@dinnerbone.com>
---
 .../org/bukkit/craftbukkit/util/TerminalConsoleHandler.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleHandler.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleHandler.java
index 2034ad972f..43bc392f3d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleHandler.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleHandler.java
@@ -20,7 +20,11 @@ public class TerminalConsoleHandler extends ConsoleHandler {
             reader.printString(ConsoleReader.RESET_LINE + "");
             reader.flushConsole();
             super.flush();
-            reader.drawLine();
+            try {
+                reader.drawLine();
+            } catch (Throwable ex) {
+                reader.getCursorBuffer().clearBuffer();
+            }
             reader.flushConsole();
         } catch (IOException ex) {
             Logger.getLogger(TerminalConsoleHandler.class.getName()).log(Level.SEVERE, null, ex);