diff --git a/src/org/mcteam/ancientgates/Gate.java b/src/org/mcteam/ancientgates/Gate.java index 7dfa95a..7906457 100644 --- a/src/org/mcteam/ancientgates/Gate.java +++ b/src/org/mcteam/ancientgates/Gate.java @@ -89,6 +89,8 @@ public class Gate extends BaseGate implements ConfigurationSerializable public Map serialize() { + validate(); // make sure to not write invalid stuff to disk + Map retVal = new HashMap(); retVal.put(idKey, id); @@ -131,6 +133,7 @@ public class Gate extends BaseGate implements ConfigurationSerializable gate.id = id; instances.put(gate.id, gate); Plugin.log("created new gate " + gate.id); + return gate; }