From e1ffe5e65b27edd18f9f2d0905959b1488484f99 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Fri, 24 Nov 2017 19:51:09 +0200 Subject: [PATCH] Fixed File not Found Exception when on plugins first boot in some cases #433 --- Plan/src/main/java/com/djrapitops/plan/Plan.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/Plan.java b/Plan/src/main/java/com/djrapitops/plan/Plan.java index c6dc762e9..1edaed683 100644 --- a/Plan/src/main/java/com/djrapitops/plan/Plan.java +++ b/Plan/src/main/java/com/djrapitops/plan/Plan.java @@ -144,7 +144,9 @@ public class Plan extends BukkitPlugin implements IPlan { public void onEnable() { super.onEnable(); 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.copyDefaults(FileUtil.lines(this, "config.yml")); config.save();