plugin: handle failure to load more gracefully
This commit is contained in:
parent
d247953546
commit
244bb32d70
@ -111,7 +111,11 @@ public class Plugin extends JavaPlugin {
|
||||
this.getDataFolder().mkdir();
|
||||
File regionConfigFile = new File(this.getDataFolder(), "regions.yml");
|
||||
Configuration regionConf = YamlConfiguration.loadConfiguration(regionConfigFile);
|
||||
try {
|
||||
m_regions.loadRegions(regionConf);
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "Could not load regions config! You risk overwriting and losing data!", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void saveRegions() {
|
||||
|
Loading…
Reference in New Issue
Block a user