fix: ensure config-legacy.yml is created before accessed (#2752)

* fix: ensure config-legacy.yml is created before accessed

* Stop error attempting to load FAWE config if it doesn't exist
This commit is contained in:
Jordan
2024-06-13 20:31:45 +02:00
committed by GitHub
parent 865cc55a0e
commit 031fdf2efd
3 changed files with 8 additions and 4 deletions

View File

@ -100,6 +100,9 @@ public class Config {
}
public boolean load(File file) {
if (!file.exists()) {
return false;
}
existingMigrateNodes = new ArrayList<>();
YamlConfiguration yml = YamlConfiguration.loadConfiguration(file);
for (String key : yml.getKeys(true)) {

View File

@ -68,6 +68,7 @@ public class YamlConfiguration extends FileConfiguration {
LOGGER.error("Could not read {}\n" + "Renamed to {}", file, dest.getAbsolutePath(), ex);
} catch (final IOException e) {
e.printStackTrace();
ex.printStackTrace();
}
}