Modified ConsoleReader to use System.in instead of FileDescriptor.in. Big thanks to escortkeel for the (unfortunately very old) PR.

This commit is contained in:
Nathan Adams 2012-01-14 17:12:45 +00:00
parent 6cc56b8c2c
commit 743c623d53

View File

@ -15,6 +15,7 @@ import java.util.logging.Logger;
// CraftBukkit start
import java.io.PrintStream;
import java.io.PrintWriter;
import java.net.UnknownHostException;
import jline.ConsoleReader;
import joptsimple.OptionSet;
@ -82,7 +83,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
// CraftBukkit start
this.options = options;
try {
this.reader = new ConsoleReader();
this.reader = new ConsoleReader(System.in, new PrintWriter(System.out)); // CraftBukkit - Added "System.in, new PrintWriter(System.out)" in the constuctor
} catch (IOException ex) {
Logger.getLogger(MinecraftServer.class.getName()).log(Level.SEVERE, null, ex);
}