mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-16 10:35:32 +01:00
Fixed bug configuration saved incorrectly. issue #274
This commit is contained in:
parent
a1824fff5b
commit
8eea065876
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package ru.tehkode.modifyworld.bukkit;
|
package ru.tehkode.modifyworld.bukkit;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -72,10 +73,16 @@ public class Modifyworld extends JavaPlugin {
|
|||||||
} else {
|
} else {
|
||||||
logger.info("[Modifyworld] Modifyworld disabled. Check config.yml!");
|
logger.info("[Modifyworld] Modifyworld disabled. Check config.yml!");
|
||||||
this.getPluginLoader().disablePlugin(this);
|
this.getPluginLoader().disablePlugin(this);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
config.save("config.yml");
|
File configFile = new File(this.getDataFolder(), "config.yml");
|
||||||
|
if(!configFile.exists()) {
|
||||||
|
configFile.mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
config.save(configFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.severe("[Modifyworld] Can't save new configuration file!");
|
logger.severe("[Modifyworld] Can't save new configuration file!");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user