X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FSonePlugin.java;h=a24802b39a8f84f567a23dea64a71797e3b67859;hb=a7289fbfa428ebc9c1facb48be08587feb0ee489;hp=fbf8b1ab38bbf374821e7c6198d66b3be166bb13;hpb=8ba12e622791bf6459d3614ac5d86436f9b409c5;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index fbf8b1a..a24802b 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -147,10 +147,13 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 /* create a configuration. */ Configuration oldConfiguration; Configuration newConfiguration = null; + boolean firstStart = !new File("sone.properties").exists(); + boolean newConfig = false; try { oldConfiguration = new Configuration(new MapConfigurationBackend(new File("sone.properties"), false)); newConfiguration = oldConfiguration; } catch (ConfigurationException ce1) { + newConfig = true; logger.log(Level.INFO, "Could not load configuration file, trying plugin store…", ce1); try { newConfiguration = new Configuration(new MapConfigurationBackend(new File("sone.properties"), true)); @@ -181,6 +184,8 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 /* create the web interface. */ webInterface = new WebInterface(this); + webInterface.setFirstStart(firstStart); + webInterface.setNewConfig(newConfig); core.addCoreListener(webInterface); /* create the identity manager. */