Update JLine
Later releases include the TerminalLineSettings patch. Also move call to AnsiConsole.systemInstall() to avoid patching AnsiWindowsTerminal. By: zreed <zach@digitalforgemc.com>
This commit is contained in:
@@ -57,7 +57,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jline</groupId>
|
<groupId>jline</groupId>
|
||||||
<artifactId>jline</artifactId>
|
<artifactId>jline</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.12</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.logging.Logger;
|
|||||||
import joptsimple.OptionParser;
|
import joptsimple.OptionParser;
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import org.fusesource.jansi.AnsiConsole;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static boolean useJline = true;
|
public static boolean useJline = true;
|
||||||
@@ -145,7 +146,9 @@ public class Main {
|
|||||||
useJline = false;
|
useJline = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!useJline) {
|
if (useJline) {
|
||||||
|
AnsiConsole.systemInstall();
|
||||||
|
} else {
|
||||||
// This ensures the terminal literal will always match the jline implementation
|
// This ensures the terminal literal will always match the jline implementation
|
||||||
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user