diff --git a/src/com/massivecraft/mcore/store/Coll.java b/src/com/massivecraft/mcore/store/Coll.java index decb1f00..0a93d1a9 100644 --- a/src/com/massivecraft/mcore/store/Coll.java +++ b/src/com/massivecraft/mcore/store/Coll.java @@ -18,8 +18,10 @@ import com.massivecraft.mcore.MPlugin; import com.massivecraft.mcore.NaturalOrderComparator; import com.massivecraft.mcore.Predictate; import com.massivecraft.mcore.store.accessor.Accessor; +import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.xlib.gson.Gson; import com.massivecraft.mcore.xlib.gson.JsonElement; +import com.massivecraft.mcore.xlib.gson.JsonSyntaxException; public class Coll implements CollInterface { @@ -498,7 +500,19 @@ public class Coll implements CollInterface this.clearIdentifiedChanges(id); - Entry entry = this.getDriver().load(this, id); + Entry entry = null; + try + { + entry = this.getDriver().load(this, id); + } + catch (JsonSyntaxException e) + { + MCore.get().log(Txt.parse("Database could not load entity. Invalid JSON syntax. You edited a file manually and did it wrong?")); + MCore.get().log(Txt.parse("Error: %s", e.getMessage())); + MCore.get().log(Txt.parse("Entity: %s", id)); + MCore.get().log(Txt.parse("Collection: %s", this.getName())); + return; + } if (entry == null) return; JsonElement raw = entry.getKey();