Check for non existing gate list while loading gates from disk.
This commit is contained in:
parent
cb0dec8b83
commit
1d08c79cff
@ -102,6 +102,10 @@ public class GatesManager
|
|||||||
this.gatesConfig = YamlConfiguration.loadConfiguration(gatesConfigFile);
|
this.gatesConfig = YamlConfiguration.loadConfiguration(gatesConfigFile);
|
||||||
this.gates = (List<Gate>)gatesConfig.getList(gatesPath);
|
this.gates = (List<Gate>)gatesConfig.getList(gatesPath);
|
||||||
|
|
||||||
|
if (this.gates == null) {
|
||||||
|
this.gates = new ArrayList<Gate>();
|
||||||
|
}
|
||||||
|
|
||||||
for (Object o : this.gates) {
|
for (Object o : this.gates) {
|
||||||
|
|
||||||
if (!(o instanceof Gate)) {
|
if (!(o instanceof Gate)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user