示例#1
0
文件: Cyborg.java 项目: Cyborg/Cyborg
  public void shutdown() {
    try {
      bot.disconnect();
    } catch (Exception ignore) {

    }
    try {
      Thread.sleep(1000);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    bot.dispose();
    pluginManager.disablePlugins();
    System.exit(0);
  }
示例#2
0
文件: Cyborg.java 项目: Cyborg/Cyborg
  public void shutdown(String reason) {
    try {
      bot.quitServer(reason);
      try {
        Thread.sleep(1000);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    } catch (Exception ignored) {

    }
    bot.dispose();
    pluginManager.disablePlugins();
    Main.getTerminalThread().interrupt();
    try {
      Thread.sleep(500);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    System.exit(0);
  }