Prevent IOException when creating new compat file

This commit is contained in:
CocoTheOwner 2020-12-20 20:50:23 +01:00
parent 5003f69e8e
commit 1b0ed90a54

View File

@ -151,8 +151,12 @@ public class Iris extends VolmitPlugin
{ {
instance = this; instance = this;
if (!new File("compat.json").exists()) { if (!new File("compat.json").exists()) {
msg("Creating Compat file.") msg("Creating Compat file.");
new File("compat.json").createNewFile(); try {
new File("compat.json").createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
} }
compat = IrisCompat.configured(getDataFile("compat.json")); compat = IrisCompat.configured(getDataFile("compat.json"));
proj = new ProjectManager(); proj = new ProjectManager();