Automatic child command addition

This commit is contained in:
Magnus Ulf Jørgensen 2017-03-12 20:53:56 +01:00
parent 89400cdb36
commit ac7046275d
12 changed files with 5 additions and 164 deletions

View File

@ -78,57 +78,6 @@ public class CmdFactions extends FactionsCommand
public CmdFactions()
{
// Children
this.addChild(this.cmdFactionsList);
this.addChild(this.cmdFactionsFaction);
this.addChild(this.cmdFactionsPlayer);
this.addChild(this.cmdFactionsStatus);
this.addChild(this.cmdFactionsJoin);
this.addChild(this.cmdFactionsLeave);
this.addChild(this.cmdFactionsHome);
this.addChild(this.cmdFactionsMap);
this.addChild(this.cmdFactionsCreate);
this.addChild(this.cmdFactionsName);
this.addChild(this.cmdFactionsDescription);
this.addChild(this.cmdFactionsMotd);
this.addChild(this.cmdFactionsSethome);
this.addChild(this.cmdFactionsUnsethome);
this.addChild(this.cmdFactionsInvite);
this.addChild(this.cmdFactionsKick);
this.addChild(this.cmdFactionsTitle);
this.addChild(this.cmdFactionsRank);
this.addChild(this.cmdFactionsRankOldLeader);
this.addChild(this.cmdFactionsRankOldOwner);
this.addChild(this.cmdFactionsRankOldOfficer);
this.addChild(this.cmdFactionsRankOldModerator);
this.addChild(this.cmdFactionsRankOldPromote);
this.addChild(this.cmdFactionsRankOldDemote);
this.addChild(this.cmdFactionsMoney);
this.addChild(this.cmdFactionsSeeChunk);
this.addChild(this.cmdFactionsSeeChunkOld);
this.addChild(this.cmdFactionsTerritorytitles);
this.addChild(this.cmdFactionsClaim);
this.addChild(this.cmdFactionsUnclaim);
this.addChild(this.cmdFactionsAccess);
this.addChild(this.cmdFactionsRelation);
this.addChild(this.cmdFactionsRelationOldAlly);
this.addChild(this.cmdFactionsRelationOldTruce);
this.addChild(this.cmdFactionsRelationOldNeutral);
this.addChild(this.cmdFactionsRelationOldEnemy);
this.addChild(this.cmdFactionsPerm);
this.addChild(this.cmdFactionsFlag);
this.addChild(this.cmdFactionsUnstuck);
this.addChild(this.cmdFactionsExpansions);
this.addChild(this.cmdFactionsTax);
this.addChild(this.cmdFactionsDynmap);
this.addChild(this.cmdFactionsOverride);
this.addChild(this.cmdFactionsDisband);
this.addChild(this.cmdFactionsPowerBoost);
this.addChild(this.cmdFactionsSetpower);
this.addChild(this.cmdFactionsConfig);
this.addChild(this.cmdFactionsClean);
this.addChild(this.cmdFactionsVersion);
// Deprecated Commands
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));

View File

@ -18,11 +18,6 @@ public class CmdFactionsAccess extends FactionsCommand
public CmdFactionsAccess()
{
// Children
this.addChild(this.cmdFactionsAccessView);
this.addChild(this.cmdFactionsAccessPlayer);
this.addChild(this.cmdFactionsAccessFaction);
// Requirements
this.addRequirements(RequirementIsPlayer.get());
}

View File

@ -2,15 +2,6 @@ package com.massivecraft.factions.cmd;
public class CmdFactionsAccessView extends CmdFactionsAccessAbstract
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsAccessView()
{
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //

View File

@ -12,20 +12,5 @@ public class CmdFactionsClaim extends FactionsCommand
public CmdFactionsSetSquare cmdFactionsClaimSquare = new CmdFactionsSetSquare(true);
public CmdFactionsSetCircle cmdFactionsClaimCircle = new CmdFactionsSetCircle(true);
public CmdFactionsSetAll cmdFactionsClaimAll = new CmdFactionsSetAll(true);
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsClaim()
{
// Children
this.addChild(this.cmdFactionsClaimOne);
this.addChild(this.cmdFactionsClaimAuto);
this.addChild(this.cmdFactionsClaimFill);
this.addChild(this.cmdFactionsClaimSquare);
this.addChild(this.cmdFactionsClaimCircle);
this.addChild(this.cmdFactionsClaimAll);
}
}

View File

@ -7,15 +7,6 @@ import java.util.Map.Entry;
public class CmdFactionsExpansions extends FactionsCommand
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsExpansions()
{
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //

View File

@ -9,17 +9,5 @@ public class CmdFactionsFlag extends FactionsCommand
CmdFactionsFlagList cmdFactionsFlagList = new CmdFactionsFlagList();
CmdFactionsFlagShow cmdFactionsFlagShow = new CmdFactionsFlagShow();
CmdFactionsFlagSet cmdFactionsFlagSet = new CmdFactionsFlagSet();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsFlag()
{
// Children
this.addChild(this.cmdFactionsFlagList);
this.addChild(this.cmdFactionsFlagShow);
this.addChild(this.cmdFactionsFlagSet);
}
}

View File

@ -9,17 +9,5 @@ public class CmdFactionsInvite extends FactionsCommand
public CmdFactionsInviteList cmdFactionsInviteList = new CmdFactionsInviteList();
public CmdFactionsInviteAdd cmdFactionsInviteAdd = new CmdFactionsInviteAdd();
public CmdFactionsInviteRemove cmdFactionsInviteRemove = new CmdFactionsInviteRemove();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsInvite()
{
// Children
this.addChild(this.cmdFactionsInviteAdd);
this.addChild(this.cmdFactionsInviteRemove);
this.addChild(this.cmdFactionsInviteList);
}
}

View File

@ -17,6 +17,7 @@ public class CmdFactionsInviteAdd extends FactionsCommand
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsInviteAdd()
{
// Parameters

View File

@ -21,14 +21,6 @@ public class CmdFactionsMoney extends FactionsCommand
public CmdFactionsMoney()
{
// Children
this.addChild(this.cmdMoneyBalance);
this.addChild(this.cmdMoneyDeposit);
this.addChild(this.cmdMoneyWithdraw);
this.addChild(this.cmdMoneyTransferFf);
this.addChild(this.cmdMoneyTransferFp);
this.addChild(this.cmdMoneyTransferPf);
// Requirements
this.addRequirements(ReqBankCommandsEnabled.get());
}

View File

@ -9,17 +9,5 @@ public class CmdFactionsPerm extends FactionsCommand
CmdFactionsPermList cmdFactionsPermList = new CmdFactionsPermList();
CmdFactionsPermShow cmdFactionsPermShow = new CmdFactionsPermShow();
CmdFactionsPermSet cmdFactionsPermSet = new CmdFactionsPermSet();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsPerm()
{
// Children
this.addChild(this.cmdFactionsPermList);
this.addChild(this.cmdFactionsPermShow);
this.addChild(this.cmdFactionsPermSet);
}
}

View File

@ -10,16 +10,4 @@ public class CmdFactionsRelation extends FactionsCommand
public CmdFactionsRelationList cmdFactionsRelationList = new CmdFactionsRelationList();
public CmdFactionsRelationWishes cmdFactionsRelationWishes = new CmdFactionsRelationWishes();
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRelation()
{
// Children
this.addChild(this.cmdFactionsRelationSet);
this.addChild(this.cmdFactionsRelationList);
this.addChild(this.cmdFactionsRelationWishes);
}
}

View File

@ -13,19 +13,4 @@ public class CmdFactionsUnclaim extends FactionsCommand
public CmdFactionsSetCircle cmdFactionsUnclaimCircle = new CmdFactionsSetCircle(false);
public CmdFactionsSetAll cmdFactionsUnclaimAll = new CmdFactionsSetAll(false);
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsUnclaim()
{
// Children
this.addChild(this.cmdFactionsUnclaimOne);
this.addChild(this.cmdFactionsUnclaimAuto);
this.addChild(this.cmdFactionsUnclaimFill);
this.addChild(this.cmdFactionsUnclaimSquare);
this.addChild(this.cmdFactionsUnclaimCircle);
this.addChild(this.cmdFactionsUnclaimAll);
}
}