Guard against non-existent plugin folder.

If there isn't already a MobArena folder in the plugins folder, this line fails if we don't make sure to recurse on the folder creation.
This commit is contained in:
Andreas Troelsen 2018-06-23 00:00:12 +02:00
parent b4e16c16b3
commit cbf18ff720

View File

@ -145,7 +145,7 @@ public class MobArena extends JavaPlugin
// Make sure the data folder exists
File data = new File(getDataFolder(), "data");
if (!data.exists()) {
boolean created = data.mkdir();
boolean created = data.mkdirs();
if (!created) {
throw new IllegalStateException("Failed to create data folder!");
}