@Override public void run()
{
	while(!stop && !hasStopped()) {
		redirectStdin();
		redirectStdout();

		try {
			for(String s : getEvents()) {
				EventHandler.handle(new Event(s));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		try { sleep(100); } catch(InterruptedException e) {}
	}

	// If the server did not stop, KILL IT.
	if(!hasStopped()) 
		forceStop();
}