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:
@@ -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!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user