mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-07 17:28:03 +08:00
Fixed File not Found Exception when on plugins first boot in some cases #433
This commit is contained in:
parent
c93d956285
commit
e1ffe5e65b
@ -144,7 +144,9 @@ public class Plan extends BukkitPlugin implements IPlan {
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
super.onEnable();
|
super.onEnable();
|
||||||
try {
|
try {
|
||||||
File configFile = new File(getDataFolder(), "config.yml");
|
File dataFolder = getDataFolder();
|
||||||
|
dataFolder.mkdirs();
|
||||||
|
File configFile = new File(dataFolder, "config.yml");
|
||||||
config = new Config(configFile);
|
config = new Config(configFile);
|
||||||
config.copyDefaults(FileUtil.lines(this, "config.yml"));
|
config.copyDefaults(FileUtil.lines(this, "config.yml"));
|
||||||
config.save();
|
config.save();
|
||||||
|
Loading…
Reference in New Issue
Block a user