This commit is contained in:
Olof Larsson 2014-09-17 16:22:45 +02:00
parent f0189c0f8f
commit 34b166503e

View File

@ -40,14 +40,11 @@ import com.massivecraft.factions.mixin.PowerMixinDefault;
import com.massivecraft.factions.task.TaskPlayerDataRemove; import com.massivecraft.factions.task.TaskPlayerDataRemove;
import com.massivecraft.factions.task.TaskEconLandReward; import com.massivecraft.factions.task.TaskEconLandReward;
import com.massivecraft.factions.task.TaskPlayerPowerUpdate; import com.massivecraft.factions.task.TaskPlayerPowerUpdate;
import com.massivecraft.factions.update.OldConfColls;
import com.massivecraft.factions.update.UpdateUtil; import com.massivecraft.factions.update.UpdateUtil;
import com.massivecraft.massivecore.Aspect; import com.massivecraft.massivecore.Aspect;
import com.massivecraft.massivecore.AspectColl; import com.massivecraft.massivecore.AspectColl;
import com.massivecraft.massivecore.MassivePlugin; import com.massivecraft.massivecore.MassivePlugin;
import com.massivecraft.massivecore.Multiverse; import com.massivecraft.massivecore.Multiverse;
import com.massivecraft.massivecore.store.Coll;
import com.massivecraft.massivecore.store.MStore;
import com.massivecraft.massivecore.util.MUtil; import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.xlib.gson.Gson; import com.massivecraft.massivecore.xlib.gson.Gson;
import com.massivecraft.massivecore.xlib.gson.GsonBuilder; import com.massivecraft.massivecore.xlib.gson.GsonBuilder;
@ -77,6 +74,12 @@ public class Factions extends MassivePlugin
private CmdFactions outerCmdFactions; private CmdFactions outerCmdFactions;
public CmdFactions getOuterCmdFactions() { return this.outerCmdFactions; } public CmdFactions getOuterCmdFactions() { return this.outerCmdFactions; }
// Aspects
// TODO: Remove in the future when the update has been removed.
private Aspect aspect;
public Aspect getAspect() { return this.aspect; }
public Multiverse getMultiverse() { return this.getAspect().getMultiverse(); }
// Database Initialized // Database Initialized
private boolean databaseInitialized; private boolean databaseInitialized;
public boolean isDatabaseInitialized() { return this.databaseInitialized; } public boolean isDatabaseInitialized() { return this.databaseInitialized; }
@ -98,6 +101,14 @@ public class Factions extends MassivePlugin
{ {
if ( ! preEnable()) return; if ( ! preEnable()) return;
// Initialize Aspects
this.aspect = AspectColl.get().get(Const.ASPECT, true);
this.aspect.register();
this.aspect.setDesc(
"<i>If the factions system even is enabled and how it's configured.",
"<i>What factions exists and what players belong to them."
);
// Register Faction accountId Extractor // Register Faction accountId Extractor
// TODO: Perhaps this should be placed in the econ integration somewhere? // TODO: Perhaps this should be placed in the econ integration somewhere?
MUtil.registerExtractor(String.class, "accountId", ExtractorFactionAccountId.get()); MUtil.registerExtractor(String.class, "accountId", ExtractorFactionAccountId.get());