diff --git a/src/de/craftinc/gates/GatesManager.java b/src/de/craftinc/gates/GatesManager.java index 9683cb1..3582ccc 100644 --- a/src/de/craftinc/gates/GatesManager.java +++ b/src/de/craftinc/gates/GatesManager.java @@ -101,8 +101,12 @@ public class GatesManager this.gatesConfig = YamlConfiguration.loadConfiguration(gatesConfigFile); this.gates = (List)gatesConfig.getList(gatesPath); - - for (Object o : this.gates) { + + if (this.gates == null) { + this.gates = new ArrayList(); + } + + for (Object o : this.gates) { if (!(o instanceof Gate)) { Plugin.log(Level.SEVERE, "Gate file on disk is invalid. No gates loaded.");