mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
Fix NPE when saving config before the config is loaded - thanks to Wolvereness for the pull request
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
e6e1d06b1c
commit
d97df0f9dc
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ public abstract class JavaPlugin implements Plugin {
|
||||||
|
|
||||||
public void saveConfig() {
|
public void saveConfig() {
|
||||||
try {
|
try {
|
||||||
newConfig.save(configFile);
|
getConfig().save(configFile);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, "Could not save config to " + configFile, ex);
|
Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, "Could not save config to " + configFile, ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue