public static void sleep(int i) { try { Thread.sleep(i); } catch (InterruptedException e) { e.printStackTrace(); } }
public void startServer() { Thread serverThread = new Thread(new LaunchMudRunnable()); serverThread.start(); try { Thread.sleep(200); // Give server time to come up. } catch (InterruptedException e) { e.printStackTrace(); } }
@Override public void run() { LaunchMud.main(new String[0]); try { Thread.sleep(15 * 60 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } // 15 minutes no shutdown coded yet. isRunning = false; }
@Override public void run() { try { client = LaunchClient.init(); } catch (IOException e) { e.printStackTrace(); } try { Thread.sleep(15 * 60 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } // 15 minutes no shutdown coded yet. isRunning = false; }