Пример #1
0
  public LaunchMudClient startClient() {
    LaunchMudClient client = new LaunchMudClient();
    Thread clientThread = new Thread(client);
    clientThread.start();

    return client;
  }
Пример #2
0
 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();
   }
 }
Пример #3
0
 public static void sleep(int i) {
   try {
     Thread.sleep(i);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
Пример #4
0
    @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;
    }
Пример #5
0
    @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;
    }