From 1a63c59c542dcfd647ab8219a38e8627c99c405e Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Mon, 11 Nov 2013 09:31:04 +0100 Subject: [PATCH] This is 2.2.2 --- plugin.yml | 2 +- src/com/massivecraft/factions/ConfServer.java | 25 ------------- src/com/massivecraft/factions/Const.java | 22 ++++++------ src/com/massivecraft/factions/Factions.java | 7 ++-- .../factions/cmd/CmdFactions.java | 35 +++++++++++-------- .../factions/cmd/CmdFactionsAccess.java | 29 +++++++++++---- .../cmd/CmdFactionsAccessAbstract.java | 14 ++++++++ .../cmd/CmdFactionsAccessFaction.java | 14 +++++++- .../factions/cmd/CmdFactionsAccessPlayer.java | 18 ++++++++-- .../factions/cmd/CmdFactionsAccessView.java | 14 ++++++-- .../factions/cmd/CmdFactionsAdmin.java | 16 +++++++-- .../factions/cmd/CmdFactionsAutoClaim.java | 15 ++++++-- .../factions/cmd/CmdFactionsClaim.java | 15 ++++++-- .../factions/cmd/CmdFactionsCreate.java | 17 +++++++-- .../factions/cmd/CmdFactionsDemote.java | 14 ++++++-- .../factions/cmd/CmdFactionsDescription.java | 15 ++++++-- .../factions/cmd/CmdFactionsDisband.java | 14 +++++++- .../factions/cmd/CmdFactionsFaction.java | 15 ++++++-- .../factions/cmd/CmdFactionsFlag.java | 14 ++++++-- .../factions/cmd/CmdFactionsHome.java | 12 ++++++- .../factions/cmd/CmdFactionsInvite.java | 15 ++++++-- .../factions/cmd/CmdFactionsJoin.java | 16 +++++++-- .../factions/cmd/CmdFactionsKick.java | 14 ++++++-- .../factions/cmd/CmdFactionsLeader.java | 17 +++++++-- .../factions/cmd/CmdFactionsLeave.java | 14 ++++++-- .../factions/cmd/CmdFactionsList.java | 16 +++++++-- .../factions/cmd/CmdFactionsMap.java | 15 ++++++-- .../factions/cmd/CmdFactionsMoney.java | 31 ++++++++-------- .../factions/cmd/CmdFactionsMoneyBalance.java | 15 ++++++-- .../factions/cmd/CmdFactionsMoneyDeposit.java | 16 +++++++-- .../cmd/CmdFactionsMoneyTransferFf.java | 16 +++++++-- .../cmd/CmdFactionsMoneyTransferFp.java | 16 +++++++-- .../cmd/CmdFactionsMoneyTransferPf.java | 16 +++++++-- .../cmd/CmdFactionsMoneyWithdraw.java | 16 +++++++-- .../factions/cmd/CmdFactionsName.java | 15 ++++++-- .../factions/cmd/CmdFactionsOfficer.java | 15 ++++++-- .../factions/cmd/CmdFactionsOpen.java | 15 ++++++-- .../factions/cmd/CmdFactionsPerm.java | 15 ++++++-- .../factions/cmd/CmdFactionsPlayer.java | 16 +++++++-- .../factions/cmd/CmdFactionsPowerBoost.java | 16 +++++++-- .../factions/cmd/CmdFactionsPromote.java | 15 ++++++-- .../cmd/CmdFactionsRelationAbstract.java | 17 +++++++-- .../factions/cmd/CmdFactionsRelationAlly.java | 7 ++++ .../cmd/CmdFactionsRelationEnemy.java | 7 ++++ .../cmd/CmdFactionsRelationNeutral.java | 7 ++++ .../cmd/CmdFactionsRelationTruce.java | 7 ++++ .../factions/cmd/CmdFactionsSeeChunk.java | 14 ++++++-- .../factions/cmd/CmdFactionsSethome.java | 15 ++++++-- .../factions/cmd/CmdFactionsTitle.java | 15 ++++++-- .../factions/cmd/CmdFactionsUnclaim.java | 12 ++++++- .../factions/cmd/CmdFactionsUnclaimall.java | 12 ++++++- .../massivecraft/factions/cmd/FCommand.java | 9 +++++ .../factions/entity/BoardColl.java | 3 +- .../factions/entity/BoardColls.java | 2 +- .../factions/entity/FactionColl.java | 3 +- .../factions/entity/FactionColls.java | 2 +- .../massivecraft/factions/entity/MConf.java | 7 ++++ .../factions/entity/MConfColl.java | 3 +- .../factions/entity/MPlayerColl.java | 3 +- .../factions/entity/UConfColl.java | 3 +- .../factions/entity/UConfColls.java | 2 +- .../factions/entity/UPlayerColl.java | 3 +- .../factions/entity/UPlayerColls.java | 2 +- 63 files changed, 651 insertions(+), 171 deletions(-) delete mode 100644 src/com/massivecraft/factions/ConfServer.java diff --git a/plugin.yml b/plugin.yml index 8174994c..d4afe94e 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ main: com.massivecraft.factions.Factions name: Factions -version: 2.2.1 +version: 2.2.2 website: http://massivecraft.com/factions authors: [Cayorion, Brettflan] description: §eFactions allows the players to team up and claim land as their own and start wars with other factions. This way we hope to inspire politics, intrigue, and team spirit. §aCayorion §efrom the minecraft server §aMassiveCraft §eis the lead Factions programmer. Feel free to visit us at §bhttp://massivecraft.com diff --git a/src/com/massivecraft/factions/ConfServer.java b/src/com/massivecraft/factions/ConfServer.java deleted file mode 100644 index aaa10d3a..00000000 --- a/src/com/massivecraft/factions/ConfServer.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.massivecraft.factions; - -import java.util.*; - -import com.massivecraft.mcore.SimpleConfig; -import com.massivecraft.mcore.util.MUtil; - -public class ConfServer extends SimpleConfig -{ - // -------------------------------------------- // - // INSTANCE & CONSTRUCT - // -------------------------------------------- // - - private static transient ConfServer i = new ConfServer(); - public static ConfServer get() { return i; } - public ConfServer() { super(Factions.get()); } - - // -------------------------------------------- // - // FIELDS - // -------------------------------------------- // - - public static List baseCommandAliases = MUtil.list("f"); - public static String dburi = "default"; - -} diff --git a/src/com/massivecraft/factions/Const.java b/src/com/massivecraft/factions/Const.java index 7aa48d3a..11e89366 100644 --- a/src/com/massivecraft/factions/Const.java +++ b/src/com/massivecraft/factions/Const.java @@ -2,18 +2,18 @@ package com.massivecraft.factions; public class Const { - // MStore Collection Names - public static final String COLLECTION_BASENAME = "factions"; - public static final String COLLECTION_BASENAME_ = COLLECTION_BASENAME+"_"; - public static final String COLLECTION_BASENAME_BOARD = COLLECTION_BASENAME_+"board"; - public static final String COLLECTION_BASENAME_FACTION = COLLECTION_BASENAME_+"faction"; - public static final String COLLECTION_BASENAME_UPLAYER = COLLECTION_BASENAME_+"uplayer"; - public static final String COLLECTION_BASENAME_MPLAYER = COLLECTION_BASENAME_+"mplayer"; - public static final String COLLECTION_BASENAME_UCONF = COLLECTION_BASENAME_+"uconf"; - public static final String COLLECTION_BASENAME_MCONF = COLLECTION_BASENAME_+"mconf"; + // Collections & Aspects + public static final String BASENAME = "factions"; + public static final String BASENAME_ = BASENAME+"_"; - // Aspect Ids - public static final String ASPECT_ID = "factions"; + public static final String COLLECTION_BOARD = BASENAME_+"board"; + public static final String COLLECTION_FACTION = BASENAME_+"faction"; + public static final String COLLECTION_UPLAYER = BASENAME_+"uplayer"; + public static final String COLLECTION_MPLAYER = BASENAME_+"mplayer"; + public static final String COLLECTION_UCONF = BASENAME_+"uconf"; + public static final String COLLECTION_MCONF = BASENAME_+"mconf"; + + public static final String ASPECT = BASENAME; // ASCII Map public static final int MAP_HEIGHT = 8; diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index 847483b6..b9aabc45 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -94,11 +94,8 @@ public class Factions extends MPlugin { if ( ! preEnable()) return; - // Load Server Config - ConfServer.get().load(); - // Initialize Aspects - this.aspect = AspectColl.get().get(Const.ASPECT_ID, true); + this.aspect = AspectColl.get().get(Const.ASPECT, true); this.aspect.register(); this.aspect.setDesc( "If the factions system even is enabled and how it's configured.", @@ -122,7 +119,7 @@ public class Factions extends MPlugin // Commands this.outerCmdFactions = new CmdFactions(); - this.outerCmdFactions.register(this); + this.outerCmdFactions.register(); // Setup Listeners FactionsListenerMain.get().setup(); diff --git a/src/com/massivecraft/factions/cmd/CmdFactions.java b/src/com/massivecraft/factions/cmd/CmdFactions.java index 199c014e..b0ed09c4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactions.java @@ -1,15 +1,19 @@ package com.massivecraft.factions.cmd; -import java.util.Collections; +import java.util.List; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.mcore.cmd.HelpCommand; import com.massivecraft.mcore.cmd.VersionCommand; public class CmdFactions extends FCommand { + // -------------------------------------------- // + // FIELDS + // -------------------------------------------- // + public CmdFactionsList cmdFactionsList = new CmdFactionsList(); public CmdFactionsFaction cmdFactionsFaction = new CmdFactionsFaction(); public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer(); @@ -47,17 +51,13 @@ public class CmdFactions extends FCommand public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost(); public VersionCommand cmdFactionsVersion = new VersionCommand(Factions.get(), Perm.VERSION.node, "v", "version"); + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactions() { - this.aliases.addAll(ConfServer.baseCommandAliases); - - // remove any nulls from extra commas - // TODO: When is this required? Should this be added to MCore? - this.aliases.removeAll(Collections.singletonList(null)); - - this.setDesc("The faction base command"); - this.setHelp("This command contains all faction stuff."); - + // Add SubCommands this.addSubCommand(HelpCommand.get()); this.addSubCommand(this.cmdFactionsList); this.addSubCommand(this.cmdFactionsFaction); @@ -95,13 +95,20 @@ public class CmdFactions extends FCommand this.addSubCommand(this.cmdFactionsAdmin); this.addSubCommand(this.cmdFactionsPowerBoost); this.addSubCommand(this.cmdFactionsVersion); + + // Misc + this.setDesc("The faction base command"); + this.setHelp("This command contains all faction stuff."); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override - public void perform() + public List getAliases() { - this.getCommandChain().add(this); - HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain); + return MConf.get().aliasesF; } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java index ab87dfd5..ad2e4dc3 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java @@ -9,28 +9,43 @@ import com.massivecraft.mcore.cmd.req.ReqIsPlayer; public class CmdFactionsAccess extends FCommand { + // -------------------------------------------- // + // FIELDS + // -------------------------------------------- // + public CmdFactionsAccessView cmdFactionsAccessView = new CmdFactionsAccessView(); public CmdFactionsAccessPlayer cmdFactionsAccessPlayer = new CmdFactionsAccessPlayer(); public CmdFactionsAccessFaction cmdFactionsAccessFaction = new CmdFactionsAccessFaction(); + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAccess() { - this.addAliases("access"); - - this.addRequirements(ReqFactionsEnabled.get()); - this.addRequirements(ReqIsPlayer.get()); - this.addRequirements(ReqHasPerm.get(Perm.ACCESS.node)); - + // Add SubCommands this.addSubCommand(this.cmdFactionsAccessView); this.addSubCommand(this.cmdFactionsAccessPlayer); this.addSubCommand(this.cmdFactionsAccessFaction); + + // Aliases + this.addAliases("access"); + + // Requirements + this.addRequirements(ReqFactionsEnabled.get()); + this.addRequirements(ReqIsPlayer.get()); + this.addRequirements(ReqHasPerm.get(Perm.ACCESS.node)); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void perform() { this.getCommandChain().add(this); - HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain); + HelpCommand.get().execute(this.sender, this.args, this.commandChain); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java index 9193a4cb..ef96c6db 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessAbstract.java @@ -17,16 +17,29 @@ import com.massivecraft.mcore.util.Txt; public abstract class CmdFactionsAccessAbstract extends FCommand { + // -------------------------------------------- // + // FIELDS + // -------------------------------------------- // + public PS chunk; public TerritoryAccess ta; public Faction hostFaction; + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAccessAbstract() { + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqIsPlayer.get()); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void perform() { @@ -58,4 +71,5 @@ public abstract class CmdFactionsAccessAbstract extends FCommand } return Txt.implodeCommaAnd(descriptions, Txt.parse(", "), Txt.parse(" and ")); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java index 8046673e..456cdcc4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java @@ -10,16 +10,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAccessFaction() { + // Aliases this.addAliases("f", "faction"); + // Args this.addRequiredArg("faction"); this.addOptionalArg("yes/no", "toggle"); - + + // Requirements this.addRequirements(ReqHasPerm.get(Perm.ACCESS_FACTION.node)); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void innerPerform() { @@ -40,4 +51,5 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract // Inform this.sendAccessInfo(); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java index e8ed2365..3f20d87f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java @@ -10,16 +10,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAccessPlayer() { + // Aliases this.addAliases("p", "player"); - + + // Args this.addRequiredArg("player"); this.addOptionalArg("yes/no", "toggle"); - + + // Requirements this.addRequirements(ReqHasPerm.get(Perm.ACCESS_PLAYER.node)); } - + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void innerPerform() { @@ -40,4 +51,5 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract // Inform this.sendAccessInfo(); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java index 320db24a..6a164388 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java @@ -3,19 +3,29 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Perm; import com.massivecraft.mcore.cmd.req.ReqHasPerm; - public class CmdFactionsAccessView extends CmdFactionsAccessAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAccessView() { + // Aliases this.addAliases("v", "view"); - + + // Requirements this.addRequirements(ReqHasPerm.get(Perm.ACCESS_VIEW.node)); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void innerPerform() { this.sendAccessInfo(); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java b/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java index 1ecfcef9..369d331d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAdmin.java @@ -7,15 +7,26 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsAdmin extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAdmin() { + // Aliases this.addAliases("admin"); - + + // Args this.addOptionalArg("on/off", "flip"); - //this.addRequirements(ReqFactionsEnabled.get()); + // Requirements + // this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -36,4 +47,5 @@ public class CmdFactionsAdmin extends FCommand Factions.get().log(msender.getId() + " DISABLED admin bypass mode."); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAutoClaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsAutoClaim.java index 56859bb1..d7d9a28d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAutoClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAutoClaim.java @@ -12,17 +12,28 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsAutoClaim extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsAutoClaim() { + // Aliases this.addAliases("autoclaim"); - + + // Args this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.AUTOCLAIM.node)); this.addRequirements(ReqIsPlayer.get()); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void perform() { diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java index 969e7a51..af109125 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java @@ -15,18 +15,28 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsClaim extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsClaim() { + // Aliases this.addAliases("claim"); - + + // Args this.addOptionalArg("radius", "1"); this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -98,4 +108,5 @@ public class CmdFactionsClaim extends FCommand }; } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java index 137f407b..f0db95b7 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java @@ -21,20 +21,31 @@ import com.massivecraft.mcore.store.MStore; public class CmdFactionsCreate extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsCreate() { + // Aliases this.addAliases("create"); - + + // Args this.addRequiredArg("name"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasntFaction.get()); this.addRequirements(ReqHasPerm.get(Perm.CREATE.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() - { + { // Args String newName = this.arg(0); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDemote.java b/src/com/massivecraft/factions/cmd/CmdFactionsDemote.java index 462e7e59..f2da783f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDemote.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDemote.java @@ -9,13 +9,19 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsDemote extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsDemote() { + // Aliases this.addAliases("demote"); - + + // Args this.addRequiredArg("player"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.DEMOTE.node)); @@ -23,6 +29,10 @@ public class CmdFactionsDemote extends FCommand //To demote someone from officer -> member you must be a leader. //We'll handle this internally } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java index f729d27f..93ccb36e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java @@ -11,18 +11,29 @@ import com.massivecraft.mcore.mixin.Mixin; public class CmdFactionsDescription extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsDescription() { + // Aliases this.addAliases("desc"); - + + // Args this.addRequiredArg("desc"); this.setErrorOnToManyArgs(false); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java index 8c93ec19..61a2226a 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java @@ -19,15 +19,26 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsDisband extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsDisband() { + // Aliases this.addAliases("disband"); - + + // Args this.addOptionalArg("faction", "you"); + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -81,4 +92,5 @@ public class CmdFactionsDisband extends FCommand faction.detach(); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java index cf578c87..d2d4a6d7 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java @@ -26,16 +26,27 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsFaction extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsFaction() { + // Aliases this.addAliases("f", "faction"); - + + // Args this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.FACTION.node)); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void perform() { diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java index 3bd0e277..1c18046d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java @@ -12,18 +12,28 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsFlag extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsFlag() { + // Aliases this.addAliases("flag"); - + + // Args this.addOptionalArg("faction", "you"); this.addOptionalArg("flag", "all"); this.addOptionalArg("yes/no", "read"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.FLAG.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java index 725a14b2..feba1a85 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java @@ -24,15 +24,25 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsHome extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsHome() { + // Aliases this.addAliases("home"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.HOME.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqIsPlayer.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java index 395c8828..6a20de11 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java @@ -14,18 +14,29 @@ import com.massivecraft.mcore.cmd.req.ReqIsPlayer; public class CmdFactionsInvite extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsInvite() { + // Aliases this.addAliases("inv", "invite"); - + + // Args this.addRequiredArg("player"); this.addOptionalArg("yes/no", "toggle"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.INVITE.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqIsPlayer.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java index baec10aa..b6ce3728 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java @@ -16,16 +16,27 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsJoin extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsJoin() { + // Aliases this.addAliases("join"); - + + // Args this.addRequiredArg("faction"); this.addOptionalArg("player", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.JOIN.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -113,4 +124,5 @@ public class CmdFactionsJoin extends FCommand } } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index e07378e3..e562093d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -17,16 +17,26 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsKick extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsKick() { + // Aliases this.addAliases("kick"); - + + // Args this.addRequiredArg("player"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.KICK.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsLeader.java b/src/com/massivecraft/factions/cmd/CmdFactionsLeader.java index ec5662b8..9c06b7b0 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsLeader.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsLeader.java @@ -15,17 +15,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; import com.massivecraft.mcore.util.Txt; public class CmdFactionsLeader extends FCommand -{ +{ + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsLeader() { + // Aliases this.addAliases("leader"); - + + // Args this.addRequiredArg("player"); this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.LEADER.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -97,4 +107,5 @@ public class CmdFactionsLeader extends FCommand uplayer.msg("%s gave %s the leadership of %s.", senderIsConsole ? "A server admin" : RelationUtil.describeThatToMe(usender, uplayer, true), newLeader.describeTo(uplayer), targetFaction.describeTo(uplayer)); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java b/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java index ddf36068..cdb9efc9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java @@ -5,16 +5,26 @@ import com.massivecraft.factions.cmd.req.ReqFactionsEnabled; import com.massivecraft.factions.cmd.req.ReqHasFaction; import com.massivecraft.mcore.cmd.req.ReqHasPerm; -public class CmdFactionsLeave extends FCommand { +public class CmdFactionsLeave extends FCommand +{ + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsLeave() { + // Aliases this.addAliases("leave"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.LEAVE.node)); this.addRequirements(ReqHasFaction.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsList.java b/src/com/massivecraft/factions/cmd/CmdFactionsList.java index c2306117..acc09f09 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsList.java @@ -15,16 +15,27 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsList extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsList() { + // Aliases this.addAliases("l", "list"); - + + // Args this.addOptionalArg("page", "1"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.LIST.node)); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void perform() { @@ -69,4 +80,5 @@ public class CmdFactionsList extends FCommand sendMessage(lines); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java index 7e149aee..53dc21ee 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java @@ -10,16 +10,27 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsMap extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMap() { + // Aliases this.addAliases("map"); - + + // Args this.addOptionalArg("on/off", "once"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MAP.node)); this.addRequirements(ReqIsPlayer.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java index dc20a56c..6dd777ee 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java @@ -3,11 +3,14 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.req.ReqFactionsEnabled; -import com.massivecraft.mcore.cmd.HelpCommand; import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsMoney extends FCommand { + // -------------------------------------------- // + // FIELDS + // -------------------------------------------- // + public CmdFactionsMoneyBalance cmdMoneyBalance = new CmdFactionsMoneyBalance(); public CmdFactionsMoneyDeposit cmdMoneyDeposit = new CmdFactionsMoneyDeposit(); public CmdFactionsMoneyWithdraw cmdMoneyWithdraw = new CmdFactionsMoneyWithdraw(); @@ -15,27 +18,27 @@ public class CmdFactionsMoney extends FCommand public CmdFactionsMoneyTransferFp cmdMoneyTransferFp = new CmdFactionsMoneyTransferFp(); public CmdFactionsMoneyTransferPf cmdMoneyTransferPf = new CmdFactionsMoneyTransferPf(); + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoney() { - this.addAliases("money"); - - this.addRequirements(ReqFactionsEnabled.get()); - this.addRequirements(ReqBankCommandsEnabled.get()); - this.addRequirements(ReqHasPerm.get(Perm.MONEY.node)); - + // Add SubCommands this.addSubCommand(this.cmdMoneyBalance); this.addSubCommand(this.cmdMoneyDeposit); this.addSubCommand(this.cmdMoneyWithdraw); this.addSubCommand(this.cmdMoneyTransferFf); this.addSubCommand(this.cmdMoneyTransferFp); this.addSubCommand(this.cmdMoneyTransferPf); - } - - @Override - public void perform() - { - this.getCommandChain().add(this); - HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain); + + // Aliases + this.addAliases("money"); + + // Requirements + this.addRequirements(ReqFactionsEnabled.get()); + this.addRequirements(ReqBankCommandsEnabled.get()); + this.addRequirements(ReqHasPerm.get(Perm.MONEY.node)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java index 9b12c33b..03913bdf 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java @@ -10,16 +10,27 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsMoneyBalance extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoneyBalance() { + // Aliases this.addAliases("b", "balance"); - + + // Args this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node)); this.addRequirements(ReqBankCommandsEnabled.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java index 786ac1f9..bc7e1029 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -15,20 +15,30 @@ import com.massivecraft.mcore.util.Txt; import org.bukkit.ChatColor; - public class CmdFactionsMoneyDeposit extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoneyDeposit() { + // Aliases this.addAliases("d", "deposit"); - + + // Args this.addRequiredArg("amount"); this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node)); this.addRequirements(ReqBankCommandsEnabled.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java index 05ef202c..72bb6840 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java @@ -18,18 +18,29 @@ import org.bukkit.ChatColor; public class CmdFactionsMoneyTransferFf extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoneyTransferFf() { + // Aliases this.addAliases("ff"); - + + // Args this.addRequiredArg("amount"); this.addRequiredArg("faction"); this.addRequiredArg("faction"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node)); this.addRequirements(ReqBankCommandsEnabled.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -50,4 +61,5 @@ public class CmdFactionsMoneyTransferFf extends FCommand Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java index 83d6a696..a80a66aa 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java @@ -20,19 +20,30 @@ import org.bukkit.ChatColor; public class CmdFactionsMoneyTransferFp extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoneyTransferFp() { + // Aliases this.addAliases("fp"); - + + // Args this.addRequiredArg("amount"); this.addRequiredArg("faction"); this.addRequiredArg("player"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node)); this.addRequirements(ReqBankCommandsEnabled.get()); } + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void perform() { @@ -52,4 +63,5 @@ public class CmdFactionsMoneyTransferFp extends FCommand Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the player \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java index a20eeb08..86fb0364 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java @@ -20,18 +20,29 @@ import org.bukkit.ChatColor; public class CmdFactionsMoneyTransferPf extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoneyTransferPf() { + // Aliases this.addAliases("pf"); - + + // Args this.addRequiredArg("amount"); this.addRequiredArg("player"); this.addRequiredArg("faction"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node)); this.addRequirements(ReqBankCommandsEnabled.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -52,4 +63,5 @@ public class CmdFactionsMoneyTransferPf extends FCommand Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the player \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java index 6d21f50e..7d397a91 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -19,17 +19,28 @@ import org.bukkit.ChatColor; public class CmdFactionsMoneyWithdraw extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsMoneyWithdraw() { + // Aliases this.addAliases("w", "withdraw"); - + + // Args this.addRequiredArg("amount"); this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node)); this.addRequirements(ReqBankCommandsEnabled.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -49,4 +60,5 @@ public class CmdFactionsMoneyWithdraw extends FCommand Factions.get().log(ChatColor.stripColor(Txt.parse("%s withdrew %s from the faction bank: %s", usender.getName(), Money.format(from, amount), from.describeTo(null)))); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsName.java b/src/com/massivecraft/factions/cmd/CmdFactionsName.java index 3df516c2..55dee0d1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsName.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsName.java @@ -16,17 +16,28 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsName extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsName() { + // Aliases this.addAliases("name"); - + + // Args this.addRequiredArg("new name"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.NAME.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsOfficer.java b/src/com/massivecraft/factions/cmd/CmdFactionsOfficer.java index 17c13859..d73e5a73 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsOfficer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsOfficer.java @@ -10,15 +10,26 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsOfficer extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsOfficer() { + // Aliases this.addAliases("officer"); - + + // Args this.addRequiredArg("player"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.OFFICER.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsOpen.java b/src/com/massivecraft/factions/cmd/CmdFactionsOpen.java index 8db88cbf..76de106c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsOpen.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsOpen.java @@ -11,17 +11,28 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsOpen extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsOpen() { + // Aliases this.addAliases("open"); - + + // Args this.addOptionalArg("yes/no", "toggle"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.OPEN.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java index 90676170..55b86c0d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java @@ -14,19 +14,30 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsPerm extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsPerm() { + // Aliases this.addAliases("perm"); - + + // Args this.addOptionalArg("faction", "you"); this.addOptionalArg("perm", "all"); this.addOptionalArg("relation", "read"); this.addOptionalArg("yes/no", "read"); this.setErrorOnToManyArgs(false); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.PERM.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java index 821a8bd5..da429d56 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java @@ -14,15 +14,26 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsPlayer extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsPlayer() { + // Aliases this.addAliases("p", "player"); - + + // Args this.addOptionalArg("player", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -70,4 +81,5 @@ public class CmdFactionsPlayer extends FCommand msg("Power per Death: %.2f", uplayer.getPowerPerDeath()); } + } \ No newline at end of file diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java index 4478285d..d4ae4a4d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java @@ -12,17 +12,28 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsPowerBoost extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsPowerBoost() { + // Aliases this.addAliases("powerboost"); - + + // Args this.addRequiredArg("p|f|player|faction"); this.addRequiredArg("name"); this.addRequiredArg("#"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -65,4 +76,5 @@ public class CmdFactionsPowerBoost extends FCommand msg(""+target+" now has a power bonus/penalty of "+targetPower+" to min and max power levels."); Factions.get().log(usender.getName()+" has set the power bonus/penalty for "+target+" to "+targetPower+"."); } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPromote.java b/src/com/massivecraft/factions/cmd/CmdFactionsPromote.java index 449314fc..14629d7d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPromote.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPromote.java @@ -9,12 +9,19 @@ import com.massivecraft.mcore.cmd.req.ReqHasPerm; public class CmdFactionsPromote extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsPromote() { + // Aliases this.addAliases("promote"); - + + // Args this.addRequiredArg("player"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.PROMOTE.node)); @@ -22,6 +29,10 @@ public class CmdFactionsPromote extends FCommand //To promote someone from member -> officer you must be a leader. //We'll handle this internally } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationAbstract.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationAbstract.java index 28a76ba6..3c471dd1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationAbstract.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationAbstract.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.FFlag; import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; @@ -9,22 +8,33 @@ import com.massivecraft.factions.cmd.req.ReqFactionsEnabled; import com.massivecraft.factions.cmd.req.ReqHasFaction; import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventRelationChange; import com.massivecraft.mcore.cmd.req.ReqHasPerm; public abstract class CmdFactionsRelationAbstract extends FCommand { public Rel targetRelation; + + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // public CmdFactionsRelationAbstract() { + // Aliases this.addRequiredArg("faction"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.RELATION.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() @@ -75,7 +85,7 @@ public abstract class CmdFactionsRelationAbstract extends FCommand else { otherFaction.msg("%s wishes to be %s.", usenderFaction.describeTo(otherFaction, true), newRelation.getColor()+newRelation.getDescFactionOne()); - otherFaction.msg("Type /"+ConfServer.baseCommandAliases.get(0)+" "+newRelation+" "+usenderFaction.getName()+" to accept."); + otherFaction.msg("Type /"+MConf.get().aliasesF.get(0)+" "+newRelation+" "+usenderFaction.getName()+" to accept."); usenderFaction.msg("%s were informed that you wish to be %s.", otherFaction.describeTo(usenderFaction, true), newRelation.getColor()+newRelation.getDescFactionOne()); } @@ -93,4 +103,5 @@ public abstract class CmdFactionsRelationAbstract extends FCommand usenderFaction.msg("This will have no effect while your faction is peaceful."); } } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationAlly.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationAlly.java index 87c33220..0a813f87 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationAlly.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationAlly.java @@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel; public class CmdFactionsRelationAlly extends CmdFactionsRelationAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsRelationAlly() { + // Aliases this.addAliases("ally"); + // Misc this.targetRelation = Rel.ALLY; } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationEnemy.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationEnemy.java index ec4dd181..e4ddf510 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationEnemy.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationEnemy.java @@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel; public class CmdFactionsRelationEnemy extends CmdFactionsRelationAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsRelationEnemy() { + // Aliases this.addAliases("enemy"); + // Misc this.targetRelation = Rel.ENEMY; } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationNeutral.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationNeutral.java index f616f45c..aa918a04 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationNeutral.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationNeutral.java @@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel; public class CmdFactionsRelationNeutral extends CmdFactionsRelationAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsRelationNeutral() { + // Aliases this.addAliases("neutral"); + // Misc this.targetRelation = Rel.NEUTRAL; } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationTruce.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationTruce.java index a9105dee..19aeef71 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationTruce.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationTruce.java @@ -4,10 +4,17 @@ import com.massivecraft.factions.Rel; public class CmdFactionsRelationTruce extends CmdFactionsRelationAbstract { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsRelationTruce() { + // Aliases this.addAliases("truce"); + // Misc this.targetRelation = Rel.TRUCE; } + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java index e42e6c8b..fd953c7a 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java @@ -14,14 +14,24 @@ import com.massivecraft.mcore.ps.PSFormatHumanSpace; public class CmdFactionsSeeChunk extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsSeeChunk() { + // Aliases this.addAliases("sc", "seechunk"); - - //this.addRequirements(ReqFactionsEnabled.get()); + + // Requirements + // this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.SEE_CHUNK.node)); this.addRequirements(ReqIsPlayer.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java b/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java index c22504e7..7e446ba1 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSethome.java @@ -14,16 +14,27 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsSethome extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsSethome() { + // Aliases this.addAliases("sethome"); - + + // Args this.addOptionalArg("faction", "you"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqIsPlayer.get()); this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java index 08b999e1..5fe0b51e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java @@ -15,17 +15,28 @@ import com.massivecraft.mcore.util.Txt; public class CmdFactionsTitle extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsTitle() { + // Aliases this.addAliases("title"); - + + // Args this.addRequiredArg("player"); this.addOptionalArg("title", ""); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.TITLE.node)); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java index b25b3bc2..c11ac507 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java @@ -11,15 +11,25 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsUnclaim extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsUnclaim() { + // Aliases this.addAliases("unclaim"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqIsPlayer.get()); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java index cea0399f..6ab45a2d 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java @@ -20,15 +20,25 @@ import com.massivecraft.mcore.ps.PS; public class CmdFactionsUnclaimall extends FCommand { + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + public CmdFactionsUnclaimall() { + // Aliases this.addAliases("unclaimall"); - + + // Requirements this.addRequirements(ReqFactionsEnabled.get()); this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM_ALL.node)); this.addRequirements(ReqHasFaction.get()); this.addRequirements(ReqRoleIsAtLeast.get(Rel.OFFICER)); } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // @Override public void perform() diff --git a/src/com/massivecraft/factions/cmd/FCommand.java b/src/com/massivecraft/factions/cmd/FCommand.java index eafb0959..83563530 100644 --- a/src/com/massivecraft/factions/cmd/FCommand.java +++ b/src/com/massivecraft/factions/cmd/FCommand.java @@ -10,10 +10,18 @@ import com.massivecraft.mcore.util.Txt; public abstract class FCommand extends MCommand { + // -------------------------------------------- // + // FIELDS + // -------------------------------------------- // + public MPlayer msender; public UPlayer usender; public Faction usenderFaction; + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + @Override public void fixSenderVars() { @@ -68,4 +76,5 @@ public abstract class FCommand extends MCommand return false; } + } diff --git a/src/com/massivecraft/factions/entity/BoardColl.java b/src/com/massivecraft/factions/entity/BoardColl.java index 30335b6b..15a56bc1 100644 --- a/src/com/massivecraft/factions/entity/BoardColl.java +++ b/src/com/massivecraft/factions/entity/BoardColl.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.Set; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.RelationParticipator; import com.massivecraft.factions.TerritoryAccess; @@ -21,7 +20,7 @@ public class BoardColl extends Coll implements BoardInterface public BoardColl(String name) { - super(name, Board.class, MStore.getDb(ConfServer.dburi), Factions.get(), false, true, true); + super(name, Board.class, MStore.getDb(), Factions.get(), false, true, true); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/BoardColls.java b/src/com/massivecraft/factions/entity/BoardColls.java index 381e20a4..98c154fd 100644 --- a/src/com/massivecraft/factions/entity/BoardColls.java +++ b/src/com/massivecraft/factions/entity/BoardColls.java @@ -46,7 +46,7 @@ public class BoardColls extends XColls implements BoardInterfa @Override public String getBasename() { - return Const.COLLECTION_BASENAME_BOARD; + return Const.COLLECTION_BOARD; } @Override diff --git a/src/com/massivecraft/factions/entity/FactionColl.java b/src/com/massivecraft/factions/entity/FactionColl.java index b6766e52..d0e1b4e0 100644 --- a/src/com/massivecraft/factions/entity/FactionColl.java +++ b/src/com/massivecraft/factions/entity/FactionColl.java @@ -8,7 +8,6 @@ import com.massivecraft.mcore.store.Coll; import com.massivecraft.mcore.store.MStore; import com.massivecraft.mcore.util.Txt; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.FFlag; import com.massivecraft.factions.FPerm; import com.massivecraft.factions.Factions; @@ -24,7 +23,7 @@ public class FactionColl extends Coll public FactionColl(String name) { - super(name, Faction.class, MStore.getDb(ConfServer.dburi), Factions.get()); + super(name, Faction.class, MStore.getDb(), Factions.get()); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/FactionColls.java b/src/com/massivecraft/factions/entity/FactionColls.java index 0c263d52..22133d16 100644 --- a/src/com/massivecraft/factions/entity/FactionColls.java +++ b/src/com/massivecraft/factions/entity/FactionColls.java @@ -42,7 +42,7 @@ public class FactionColls extends XColls @Override public String getBasename() { - return Const.COLLECTION_BASENAME_FACTION; + return Const.COLLECTION_FACTION; } @Override diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 77ad4956..b969520f 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.entity; import java.util.HashSet; import java.util.LinkedHashSet; +import java.util.List; import java.util.Set; import java.util.TreeSet; @@ -40,6 +41,12 @@ public class MConf extends Entity return this; } + // -------------------------------------------- // + // COMMAND ALIASES + // -------------------------------------------- // + + public List aliasesF = MUtil.list("f"); + // -------------------------------------------- // // TASKS // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/MConfColl.java b/src/com/massivecraft/factions/entity/MConfColl.java index c7a705d6..2f7997bb 100644 --- a/src/com/massivecraft/factions/entity/MConfColl.java +++ b/src/com/massivecraft/factions/entity/MConfColl.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.entity; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Const; import com.massivecraft.factions.Factions; import com.massivecraft.mcore.MCore; @@ -17,7 +16,7 @@ public class MConfColl extends Coll public static MConfColl get() { return i; } private MConfColl() { - super(Const.COLLECTION_BASENAME_MCONF, MConf.class, MStore.getDb(ConfServer.dburi), Factions.get()); + super(Const.COLLECTION_MCONF, MConf.class, MStore.getDb(), Factions.get()); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/MPlayerColl.java b/src/com/massivecraft/factions/entity/MPlayerColl.java index d011666f..a1448870 100644 --- a/src/com/massivecraft/factions/entity/MPlayerColl.java +++ b/src/com/massivecraft/factions/entity/MPlayerColl.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.entity; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Const; import com.massivecraft.factions.Factions; import com.massivecraft.mcore.store.MStore; @@ -16,7 +15,7 @@ public class MPlayerColl extends SenderColl public static MPlayerColl get() { return i; } private MPlayerColl() { - super(Const.COLLECTION_BASENAME_MPLAYER, MPlayer.class, MStore.getDb(ConfServer.dburi), Factions.get()); + super(Const.COLLECTION_MPLAYER, MPlayer.class, MStore.getDb(), Factions.get()); } } diff --git a/src/com/massivecraft/factions/entity/UConfColl.java b/src/com/massivecraft/factions/entity/UConfColl.java index b001b060..d1bcfa57 100644 --- a/src/com/massivecraft/factions/entity/UConfColl.java +++ b/src/com/massivecraft/factions/entity/UConfColl.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.entity; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.mcore.MCore; import com.massivecraft.mcore.store.Coll; @@ -14,7 +13,7 @@ public class UConfColl extends Coll public UConfColl(String name) { - super(name, UConf.class, MStore.getDb(ConfServer.dburi), Factions.get()); + super(name, UConf.class, MStore.getDb(), Factions.get()); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/UConfColls.java b/src/com/massivecraft/factions/entity/UConfColls.java index f0ab2fef..be4ea4e6 100644 --- a/src/com/massivecraft/factions/entity/UConfColls.java +++ b/src/com/massivecraft/factions/entity/UConfColls.java @@ -33,7 +33,7 @@ public class UConfColls extends XColls @Override public String getBasename() { - return Const.COLLECTION_BASENAME_UCONF; + return Const.COLLECTION_UCONF; } @Override diff --git a/src/com/massivecraft/factions/entity/UPlayerColl.java b/src/com/massivecraft/factions/entity/UPlayerColl.java index 4682f057..0120d1c3 100644 --- a/src/com/massivecraft/factions/entity/UPlayerColl.java +++ b/src/com/massivecraft/factions/entity/UPlayerColl.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.entity; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.Rel; import com.massivecraft.mcore.mixin.Mixin; @@ -17,7 +16,7 @@ public class UPlayerColl extends SenderColl public UPlayerColl(String name) { - super(name, UPlayer.class, MStore.getDb(ConfServer.dburi), Factions.get()); + super(name, UPlayer.class, MStore.getDb(), Factions.get()); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/entity/UPlayerColls.java b/src/com/massivecraft/factions/entity/UPlayerColls.java index d0075740..93de2ee4 100644 --- a/src/com/massivecraft/factions/entity/UPlayerColls.java +++ b/src/com/massivecraft/factions/entity/UPlayerColls.java @@ -40,7 +40,7 @@ public class UPlayerColls extends XColls @Override public String getBasename() { - return Const.COLLECTION_BASENAME_UPLAYER; + return Const.COLLECTION_UPLAYER; } @Override