diff --git a/src/com/massivecraft/factions/entity/FactionColl.java b/src/com/massivecraft/factions/entity/FactionColl.java index 56c4ebcc..76e247da 100644 --- a/src/com/massivecraft/factions/entity/FactionColl.java +++ b/src/com/massivecraft/factions/entity/FactionColl.java @@ -44,7 +44,10 @@ public class FactionColl extends Coll { Faction ret = super.get(oid); - if (ret == null) + // We should only trigger automatic clean if the whole database system is initialized. + // A cleaning can only be successful if all data is available. + // Example Reason: When creating the special factions for the first time "createSpecialFactions" a clean would be triggered otherwise. + if (ret == null && Factions.get().isDatabaseInitialized()) { String message = Txt.parse("Non existing factionId %s requested. Cleaning all boards and uplayers.", this.fixId(oid)); Factions.get().log(message); diff --git a/src/com/massivecraft/factions/entity/FactionColls.java b/src/com/massivecraft/factions/entity/FactionColls.java index a4628950..0c263d52 100644 --- a/src/com/massivecraft/factions/entity/FactionColls.java +++ b/src/com/massivecraft/factions/entity/FactionColls.java @@ -49,7 +49,7 @@ public class FactionColls extends XColls public void init() { super.init(); - + this.migrate(); } diff --git a/src/com/massivecraft/factions/entity/UPlayerColls.java b/src/com/massivecraft/factions/entity/UPlayerColls.java index e8106ea2..d0075740 100644 --- a/src/com/massivecraft/factions/entity/UPlayerColls.java +++ b/src/com/massivecraft/factions/entity/UPlayerColls.java @@ -61,7 +61,7 @@ public class UPlayerColls extends XColls // Already migrated? if ( ! oldFile.exists()) return; - // Read the file content through GSON. + // Read the file content through GSON. Type type = new TypeToken>(){}.getType(); Map id2uplayer = Factions.get().gson.fromJson(DiscUtil.readCatch(oldFile), type);