mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Don't fail to load when moving components file
This commit is contained in:
parent
fee1ffa2e9
commit
46fbc05040
@ -89,15 +89,14 @@ public class ComponentPresetManager {
|
|||||||
Path oldLoc = Paths.get(PlotSquared.platform().getDirectory() + "/components.yml");
|
Path oldLoc = Paths.get(PlotSquared.platform().getDirectory() + "/components.yml");
|
||||||
Path newLoc = Paths.get(PlotSquared.platform().getDirectory() + "/config" + "/components.yml");
|
Path newLoc = Paths.get(PlotSquared.platform().getDirectory() + "/config" + "/components.yml");
|
||||||
Files.move(oldLoc, newLoc);
|
Files.move(oldLoc, newLoc);
|
||||||
} else {
|
}
|
||||||
try {
|
try {
|
||||||
this.componentsFile = new File(folder, "components.yml");
|
this.componentsFile = new File(folder, "components.yml");
|
||||||
if (!this.componentsFile.exists() && !this.componentsFile.createNewFile()) {
|
if (!this.componentsFile.exists() && !this.componentsFile.createNewFile()) {
|
||||||
logger.error("Could not create the components.yml file. Please create 'components.yml' manually.");
|
logger.error("Could not create the components.yml file. Please create 'components.yml' manually.");
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationSerialization.registerClass(ComponentPreset.class, "ComponentPreset");
|
ConfigurationSerialization.registerClass(ComponentPreset.class, "ComponentPreset");
|
||||||
|
Loading…
Reference in New Issue
Block a user