From 1a3f153a08806bf114480f70fee21c798c072f50 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 25 Apr 2013 08:34:59 +0200 Subject: [PATCH] Improve entity.changed(), it now checks for attachment and inited. --- src/com/massivecraft/mcore/store/Entity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/mcore/store/Entity.java b/src/com/massivecraft/mcore/store/Entity.java index 911d39b8..9c6db347 100644 --- a/src/com/massivecraft/mcore/store/Entity.java +++ b/src/com/massivecraft/mcore/store/Entity.java @@ -60,7 +60,12 @@ public abstract class Entity> implements Comparable String id = this.getId(); if (id == null) return; - this.getColl().changedIds.add(id); + Coll coll = this.getColl(); + if (coll == null) return; + + if (!coll.inited()) return; + + coll.changedIds.add(id); } public ModificationState sync()