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