diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-07 15:11:22 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-07 15:11:22 +0000 |
commit | 76c23ee5886897a1beced31dbffa15574864e6bb (patch) | |
tree | 774b156cb26aa06346fbb1a261a568474314cc20 | |
parent | 5743c3bccf055398bd26ce724b7415c3c1fbde59 (diff) | |
download | bukkit-76c23ee5886897a1beced31dbffa15574864e6bb.tar bukkit-76c23ee5886897a1beced31dbffa15574864e6bb.tar.gz bukkit-76c23ee5886897a1beced31dbffa15574864e6bb.tar.lz bukkit-76c23ee5886897a1beced31dbffa15574864e6bb.tar.xz bukkit-76c23ee5886897a1beced31dbffa15574864e6bb.zip |
Fix NPE when saving config before the config is loaded - thanks to Wolvereness for the pull request
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/JavaPlugin.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index c654f514..9becc234 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -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); } |