mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-23 08:16:52 +00:00
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:
@ -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)) {
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user