/** Sets the serverRunning variable to false, in order to get the server to shut down. */
  public void initiateShutdown() {
    super.initiateShutdown();

    if (this.lanServerPing != null) {
      this.lanServerPing.interrupt();
      this.lanServerPing = null;
    }
  }
Ejemplo n.º 2
0
  public void windowClosing(WindowEvent par1WindowEvent) {
    mcServer.initiateShutdown();

    while (!mcServer.serverStopped) {
      try {
        Thread.sleep(100L);
      } catch (InterruptedException interruptedexception) {
        interruptedexception.printStackTrace();
      }
    }

    System.exit(0);
  }