Use jansi's Windows support for terminal colors.

This commit is contained in:
Travis Watkins 2012-05-23 15:02:57 -05:00
parent 478fa4a969
commit fdddc681d2
2 changed files with 9 additions and 0 deletions

View file

@ -69,6 +69,7 @@
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- jline and jansi versions must be kept in sync -->
<dependency> <dependency>
<groupId>jline</groupId> <groupId>jline</groupId>
<artifactId>jline</artifactId> <artifactId>jline</artifactId>
@ -76,6 +77,13 @@
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.8</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>org.xerial</groupId> <groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId> <artifactId>sqlite-jdbc</artifactId>

View file

@ -64,6 +64,7 @@ public class AnsiWindowsTerminal
} }
private static boolean detectAnsiSupport() { private static boolean detectAnsiSupport() {
AnsiConsole.systemInstall(); // CraftBukkit - install Windows JNI library
OutputStream out = AnsiConsole.wrapOutputStream(new ByteArrayOutputStream()); OutputStream out = AnsiConsole.wrapOutputStream(new ByteArrayOutputStream());
try { try {
out.close(); out.close();