コード例 #1
0
  public void onDisable() {
    disabling = false;
    PluginDescriptionFile pdfFile = p.getDescription();
    SettingsManager.getInstance().saveSpawns();
    SettingsManager.getInstance().saveSystemConfig();
    for (Game g : GameManager.getInstance().getGames()) {
      try {
        g.disable();
      } catch (Exception e) {
        // will throw useless "tried to register task blah blah error." Use the method below to
        // reset the arena without a task.
      }
      QueueManager.getInstance().rollback(g.getID(), true);
    }

    logger.info(
        pdfFile.getName()
            + " version "
            + pdfFile.getVersion()
            + " has now been disabled and reset");
  }