Fix NPE when saving config before the config is loaded - thanks to Wolvereness for the pull request

This commit is contained in:
Nathan Adams
2012-01-07 15:11:22 +00:00
parent b7d76e5266
commit 423974f236

View File

@@ -139,7 +139,7 @@ public abstract class JavaPlugin implements Plugin {
public void saveConfig() {
try {
newConfig.save(configFile);
getConfig().save(configFile);
} catch (IOException ex) {
Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, "Could not save config to " + configFile, ex);
}