- configuration = new Configuration(new XMLConfigurationBackend(new File("sone.xml"), true));
- } catch (ConfigurationException ce1) {
- logger.log(Level.SEVERE, "Could not load or create the “sone.xml” configuration file!");
- configuration = new Configuration(new MapConfigurationBackend(Collections.<String, String> emptyMap()));
+ newConfiguration = new Configuration(new MapConfigurationBackend(new File("sone.properties"), true));
+ logger.log(Level.INFO, "Created new configuration file.");
+ } catch (ConfigurationException ce2) {
+ logger.log(Level.SEVERE, "Could not create configuration file, using Plugin Store!", ce2);
+ }
+ try {
+ oldConfiguration = new Configuration(new PluginStoreConfigurationBackend(pluginRespirator));
+ logger.log(Level.INFO, "Plugin store loaded.");
+ } catch (DatabaseDisabledException dde1) {
+ logger.log(Level.SEVERE, "Could not load any configuration, using empty configuration!");
+ oldConfiguration = new Configuration(new MapConfigurationBackend());