From ac7046275d89fc797e8014b58243ed0fa77f2bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Ulf=20J=C3=B8rgensen?= Date: Sun, 12 Mar 2017 20:53:56 +0100 Subject: [PATCH] Automatic child command addition --- .../factions/cmd/CmdFactions.java | 51 ------------------- .../factions/cmd/CmdFactionsAccess.java | 5 -- .../factions/cmd/CmdFactionsAccessView.java | 9 ---- .../factions/cmd/CmdFactionsClaim.java | 17 +------ .../factions/cmd/CmdFactionsExpansions.java | 9 ---- .../factions/cmd/CmdFactionsFlag.java | 14 +---- .../factions/cmd/CmdFactionsInvite.java | 14 +---- .../factions/cmd/CmdFactionsInviteAdd.java | 1 + .../factions/cmd/CmdFactionsMoney.java | 8 --- .../factions/cmd/CmdFactionsPerm.java | 14 +---- .../factions/cmd/CmdFactionsRelation.java | 12 ----- .../factions/cmd/CmdFactionsUnclaim.java | 15 ------ 12 files changed, 5 insertions(+), 164 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactions.java b/src/com/massivecraft/factions/cmd/CmdFactions.java index e23afc4f..5f15f509 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactions.java @@ -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")); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java index 9c82346c..ebc64ba4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java @@ -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()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java index 484d255e..2353901e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java @@ -2,15 +2,6 @@ package com.massivecraft.factions.cmd; public class CmdFactionsAccessView extends CmdFactionsAccessAbstract { - // -------------------------------------------- // - // CONSTRUCT - // -------------------------------------------- // - - public CmdFactionsAccessView() - { - - } - // -------------------------------------------- // // OVERRIDE // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java index 674c33c0..1963c676 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java @@ -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); - } - + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java b/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java index 879264d8..f36f50d3 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java @@ -7,15 +7,6 @@ import java.util.Map.Entry; public class CmdFactionsExpansions extends FactionsCommand { - // -------------------------------------------- // - // CONSTRUCT - // -------------------------------------------- // - - public CmdFactionsExpansions() - { - - } - // -------------------------------------------- // // OVERRIDE // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java index 3a64dc51..a48a1650 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java @@ -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); - } - + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java index d3b7a4ff..680804a3 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java @@ -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); - } - + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java index f944785f..f9fb4582 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java @@ -17,6 +17,7 @@ public class CmdFactionsInviteAdd extends FactionsCommand // -------------------------------------------- // // CONSTRUCT // -------------------------------------------- // + public CmdFactionsInviteAdd() { // Parameters diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java index ee389fa0..1cc75228 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java @@ -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()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java index 11cfa445..48eab376 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java @@ -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); - } - + } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java index 63f5c092..6c60d4ad 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java @@ -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); - } - } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java index 9d78d1e3..91d5c67a 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java @@ -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); - } - }