mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Catch FileNotFoundException in YamlFileStore.
This commit is contained in:
parent
ae8bf63c86
commit
929f9e99cd
@ -42,6 +42,7 @@
|
||||
import org.yaml.snakeyaml.representer.Representer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@ -107,7 +108,11 @@ public Set<ProtectedRegion> loadAll() throws IOException {
|
||||
Map<String, ProtectedRegion> loaded = new HashMap<String, ProtectedRegion>();
|
||||
|
||||
YAMLProcessor config = createYamlProcessor(file);
|
||||
config.load();
|
||||
try {
|
||||
config.load();
|
||||
} catch (FileNotFoundException e) {
|
||||
return new HashSet<ProtectedRegion>(loaded.values());
|
||||
}
|
||||
|
||||
Map<String, YAMLNode> regionData = config.getNodes("regions");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user