Make configs created automatically
They weren't???
This commit is contained in:
parent
88df6c5781
commit
c645d56085
1 changed files with 10 additions and 9 deletions
|
@ -51,14 +51,7 @@ 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");
|
||||
|
@ -74,6 +67,14 @@ public class RealWeatherPlugin extends JavaPlugin {
|
|||
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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue