Hello
So for my game, I’m making a server for the multiplayer. Now the way it works, for the console, it uses a cmd window which will display all the output and get the input from the user. For the input I’m using jline, which is better than using a scanner, cause the scanner holds the update loop until gets input. So the way I currently get commands is
[java]try {
setCurrentCommand = new jline.ConsoleReader().readLine();
} catch (IOException e) {
e.printStackTrace();
}[/java]
This is fine, cause it lets the update loop keep running, though in my tests I couldn’t get it to take the input. So in the eclipse console, which is the same as the cmd console I typed in helloWorld for example and it should make it through the system and eventually give out a System.out.println(“Hello World”);
Instead the String stays null and never gets my input. So I was wondering if someone could give me an idea how to use jline on server base, inside the update loop, unless I’m going to have to put it on a while statement.
Thanks Sam