diff --git a/src/de/craftinc/gates/Gate.java b/src/de/craftinc/gates/Gate.java index 2fd860e..b658490 100644 --- a/src/de/craftinc/gates/Gate.java +++ b/src/de/craftinc/gates/Gate.java @@ -294,18 +294,18 @@ public class Gate implements ConfigurationSerializable Plugin.getPlugin().getGatesManager().storeInvalidGate(map); } + + try { + validate(); // make sure to not write invalid stuff to disk + } + catch (Exception e) { + Plugin.log("The loaded gate " + this.getId() + " seems to be not valid: " + e.getMessage()); + } } public Map serialize() { - try { - validate(); // make sure to not write invalid stuff to disk - } - catch (Exception e) { - Plugin.log("Gate " + this.getId() + " seems to be not valid. It got closed before serializing! (Reason: " + e.getMessage() + ")"); - } - Map retVal = new HashMap(); retVal.put(idKey, id);