diff --git a/src/main/java/eu/m724/realweather/RealWeatherPlugin.java b/src/main/java/eu/m724/realweather/RealWeatherPlugin.java index 3ffb775..dc9f8dd 100644 --- a/src/main/java/eu/m724/realweather/RealWeatherPlugin.java +++ b/src/main/java/eu/m724/realweather/RealWeatherPlugin.java @@ -51,15 +51,8 @@ public class RealWeatherPlugin extends JavaPlugin { thunderConfiguration, timeConfiguration; DebugLogger.info("loading configurations", 1); - - if (!new File(dataFolder, "config.yml").exists()) { - logger.warning("This is the first time running this plugin."); - logger.warning("Please shut down the server, review the config files, and enter your API keys."); - - getServer().getPluginManager().disablePlugin(this); - return; - } - + boolean firstRun = !new File(dataFolder, "config.yml").exists(); + try { configuration = getConfig("config.yml"); mapConfiguration = getConfig("map.yml"); @@ -73,6 +66,14 @@ public class RealWeatherPlugin extends JavaPlugin { getServer().getPluginManager().disablePlugin(this); return; } + + if (firstRun) { + logger.warning("This is the first time running this plugin."); + logger.warning("Please shut down the server, review the config files, and enter your API keys."); + + getServer().getPluginManager().disablePlugin(this); + return; + } DebugLogger.baseLogger = logger; DebugLogger.debugLevel = configuration.getInt("debug");