/**
   * Method for writing the configuration file. First we write the standard configuration part, than
   * we write the custom configuration part via #writeCustomConfig()
   *
   * @return true if writing the config was successful
   * @see #writeCustomConfig(java.io.PrintWriter)
   */
  public boolean writeConfig() {
    attackControlLogger.debug("creating config");
    boolean success = false;
    try {
      PrintWriter stream;
      File folder = main.getDataFolder();
      if (folder != null) {
        folder.mkdirs();
      }
      PluginDescriptionFile pdfFile = main.getDescription();
      stream = new PrintWriter(pluginPath + configFile);
      attackControlLogger.debug("starting contents");
      // Let's write our config ;)
      stream.println(
          "# "
              + pdfFile.getName()
              + " "
              + pdfFile.getVersion()
              + " by "
              + pdfFile.getAuthors().toString());
      stream.println("#");
      stream.println("# Configuration File for module [" + MODULE_NAME + "]");
      stream.println("#");
      stream.println("# For detailed assistance please visit: " + mainConfig.getPluginSlug());
      stream.println();
      stream.println("# Configuration Version");
      stream.println("configVer: \"" + configVer + "\"");
      stream.println();
      // Getting the custom config information from the top of the class
      attackControlLogger.debug("going for customConfig");
      writeCustomConfig(stream);

      stream.println();

      stream.close();

      success = true;

    } catch (FileNotFoundException e) {
      attackControlLogger.warning("Error saving the " + configFile + ".");
    }

    return success;
  }