Don't fail to load when moving components file

This commit is contained in:
Hannes Greule 2021-02-20 19:41:58 +01:00
parent fee1ffa2e9
commit 46fbc05040

View File

@ -89,7 +89,7 @@ public class ComponentPresetManager {
Path oldLoc = Paths.get(PlotSquared.platform().getDirectory() + "/components.yml");
Path newLoc = Paths.get(PlotSquared.platform().getDirectory() + "/config" + "/components.yml");
Files.move(oldLoc, newLoc);
} else {
}
try {
this.componentsFile = new File(folder, "components.yml");
if (!this.componentsFile.exists() && !this.componentsFile.createNewFile()) {
@ -98,7 +98,6 @@ public class ComponentPresetManager {
} catch (IOException e) {
e.printStackTrace();
}
}
ConfigurationSerialization.registerClass(ComponentPreset.class, "ComponentPreset");