From 0ba52eae1489335cdf67351028eb2413bae56534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Ulf=20J=C3=B8rgensen?= Date: Fri, 10 Feb 2017 16:38:36 +0100 Subject: [PATCH] Clean up commands --- plugin.yml | 3 ++ src/com/massivecraft/factions/Perm.java | 1 + .../factions/cmd/CmdFactionsAccess.java | 9 +----- .../cmd/CmdFactionsAccessFaction.java | 8 ----- .../factions/cmd/CmdFactionsAccessPlayer.java | 8 ----- .../factions/cmd/CmdFactionsAccessView.java | 7 ----- .../factions/cmd/CmdFactionsClaim.java | 10 ------- .../factions/cmd/CmdFactionsCreate.java | 5 +--- .../factions/cmd/CmdFactionsDescription.java | 6 ---- .../factions/cmd/CmdFactionsDisband.java | 14 ++------- .../factions/cmd/CmdFactionsExpansions.java | 6 ---- .../factions/cmd/CmdFactionsFaction.java | 9 ++---- .../factions/cmd/CmdFactionsFlag.java | 9 ------ .../factions/cmd/CmdFactionsFlagList.java | 8 ----- .../factions/cmd/CmdFactionsFlagSet.java | 8 ----- .../factions/cmd/CmdFactionsFlagShow.java | 8 ----- .../factions/cmd/CmdFactionsHome.java | 9 +----- .../factions/cmd/CmdFactionsInvite.java | 10 ------- .../factions/cmd/CmdFactionsInviteAdd.java | 8 ----- .../factions/cmd/CmdFactionsInviteList.java | 7 ----- .../factions/cmd/CmdFactionsInviteRemove.java | 8 ----- .../factions/cmd/CmdFactionsJoin.java | 9 +----- .../factions/cmd/CmdFactionsKick.java | 8 ----- .../factions/cmd/CmdFactionsLeave.java | 6 ---- .../factions/cmd/CmdFactionsList.java | 8 ----- .../factions/cmd/CmdFactionsMap.java | 6 ---- .../factions/cmd/CmdFactionsMoney.java | 6 ---- .../factions/cmd/CmdFactionsMoneyBalance.java | 7 +---- .../factions/cmd/CmdFactionsMoneyDeposit.java | 10 ++----- .../cmd/CmdFactionsMoneyTransferFf.java | 10 ++++--- .../cmd/CmdFactionsMoneyTransferFp.java | 12 ++++---- .../cmd/CmdFactionsMoneyTransferPf.java | 12 ++++---- .../cmd/CmdFactionsMoneyWithdraw.java | 29 +++++++------------ .../factions/cmd/CmdFactionsMotd.java | 8 ----- .../factions/cmd/CmdFactionsName.java | 8 ----- .../factions/cmd/CmdFactionsOverride.java | 7 +---- .../factions/cmd/CmdFactionsPerm.java | 9 ------ .../factions/cmd/CmdFactionsPermList.java | 8 ----- .../factions/cmd/CmdFactionsPermSet.java | 8 ----- .../factions/cmd/CmdFactionsPermShow.java | 8 ----- .../factions/cmd/CmdFactionsPlayer.java | 10 +------ .../factions/cmd/CmdFactionsPowerBoost.java | 10 +------ .../factions/cmd/CmdFactionsRank.java | 7 ----- .../factions/cmd/CmdFactionsRankOld.java | 1 + .../factions/cmd/CmdFactionsRelation.java | 10 ------- .../factions/cmd/CmdFactionsRelationList.java | 9 ------ .../factions/cmd/CmdFactionsRelationOld.java | 1 + .../factions/cmd/CmdFactionsRelationSet.java | 9 ------ .../cmd/CmdFactionsRelationWishes.java | 9 ------ .../factions/cmd/CmdFactionsSeeChunk.java | 5 +--- .../factions/cmd/CmdFactionsSeeChunkOld.java | 5 +--- .../factions/cmd/CmdFactionsSetAuto.java | 1 + .../factions/cmd/CmdFactionsSetX.java | 1 + .../factions/cmd/CmdFactionsStatus.java | 9 ------ .../cmd/CmdFactionsTerritorytitles.java | 5 +--- .../factions/cmd/CmdFactionsTitle.java | 7 ----- .../factions/cmd/CmdFactionsUnclaim.java | 10 ------- .../factions/cmd/CmdFactionsUnsethome.java | 8 ----- .../factions/cmd/CmdFactionsUnstuck.java | 6 ---- .../factions/cmd/CmdFactionsXPlaceholder.java | 1 + .../factions/cmd/FactionsCommand.java | 15 ++++++++-- 61 files changed, 70 insertions(+), 409 deletions(-) diff --git a/plugin.yml b/plugin.yml index dd403c84..d0bc69fa 100644 --- a/plugin.yml +++ b/plugin.yml @@ -15,6 +15,7 @@ permissions: factions.access.player: {description: grant player access, with the proper fperm, default: false} factions.access.view: {description: view access, default: false} factions.override: {description: enable override mode, default: false} + factions.basecommand: {description: use factions base command, default: false} factions.claim: {description: claim faction territory, default: false} factions.claim.one: {description: claim a single chunk, default: false} factions.claim.auto: {description: claim as you walk around, default: false} @@ -96,6 +97,7 @@ permissions: factions.access.player: true factions.access.view: true factions.override: true + factions.basecommand: true factions.claim: true factions.claim.one: true factions.claim.auto: true @@ -205,6 +207,7 @@ permissions: factions.access.faction: true factions.access.player: true factions.access.view: true + factions.basecommand: true factions.claim: true factions.claim.one: true factions.claim.auto: true diff --git a/src/com/massivecraft/factions/Perm.java b/src/com/massivecraft/factions/Perm.java index 52c826e6..edc336aa 100644 --- a/src/com/massivecraft/factions/Perm.java +++ b/src/com/massivecraft/factions/Perm.java @@ -16,6 +16,7 @@ public enum Perm implements Identified ACCESS_PLAYER, ACCESS_FACTION, OVERRIDE, + BASECOMMAND, CLAIM, CLAIM_ONE, CLAIM_AUTO, diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java index c606f14d..9c82346c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccess.java @@ -1,10 +1,7 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; - public class CmdFactionsAccess extends FactionsCommand { // -------------------------------------------- // @@ -25,13 +22,9 @@ public class CmdFactionsAccess extends FactionsCommand this.addChild(this.cmdFactionsAccessView); this.addChild(this.cmdFactionsAccessPlayer); this.addChild(this.cmdFactionsAccessFaction); - - // Aliases - this.addAliases("access"); - + // Requirements this.addRequirements(RequirementIsPlayer.get()); - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java index 67f82f8b..90d5b13f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessFaction.java @@ -1,12 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract @@ -17,15 +15,9 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract public CmdFactionsAccessFaction() { - // Aliases - this.addAliases("faction"); - // Parameters this.addParameter(TypeFaction.get(), "faction"); this.addParameter(TypeBooleanYes.get(), "yes/no", "toggle"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_FACTION)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java index a5c091ff..f376cf02 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessPlayer.java @@ -1,12 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract @@ -17,15 +15,9 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract public CmdFactionsAccessPlayer() { - // Aliases - this.addAliases("player"); - // Parameters this.addParameter(TypeMPlayer.get(), "player"); this.addParameter(TypeBooleanYes.get(), "yes/no", "toggle"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_PLAYER)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java index 32506226..484d255e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsAccessView.java @@ -1,8 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - public class CmdFactionsAccessView extends CmdFactionsAccessAbstract { // -------------------------------------------- // @@ -11,11 +8,7 @@ public class CmdFactionsAccessView extends CmdFactionsAccessAbstract public CmdFactionsAccessView() { - // Aliases - this.addAliases("view"); - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_VIEW)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java index c78b024e..674c33c0 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsClaim.java @@ -1,9 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - - public class CmdFactionsClaim extends FactionsCommand { // -------------------------------------------- // @@ -23,9 +19,6 @@ public class CmdFactionsClaim extends FactionsCommand public CmdFactionsClaim() { - // Aliases - this.addAliases("claim"); - // Children this.addChild(this.cmdFactionsClaimOne); this.addChild(this.cmdFactionsClaimAuto); @@ -33,9 +26,6 @@ public class CmdFactionsClaim extends FactionsCommand this.addChild(this.cmdFactionsClaimSquare); this.addChild(this.cmdFactionsClaimCircle); this.addChild(this.cmdFactionsClaimAll); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.CLAIM)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java index d20b1406..7508a8c5 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java @@ -5,7 +5,6 @@ import java.util.ArrayList; import org.bukkit.ChatColor; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.req.ReqHasntFaction; import com.massivecraft.factions.entity.Faction; @@ -15,7 +14,6 @@ import com.massivecraft.factions.event.EventFactionsCreate; import com.massivecraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.store.MStore; @@ -29,14 +27,13 @@ public class CmdFactionsCreate extends FactionsCommand public CmdFactionsCreate() { // Aliases - this.addAliases("create", "new"); + this.addAliases("new"); // Parameters this.addParameter(TypeString.get(), "name"); // Requirements this.addRequirements(ReqHasntFaction.get()); - this.addRequirements(RequirementHasPerm.get(Perm.CREATE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java index 9c0a3c26..73f7e1c5 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java @@ -1,12 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqHasFaction; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsDescriptionChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.mixin.MixinDisplayName; @@ -18,14 +16,10 @@ public class CmdFactionsDescription extends FactionsCommand public CmdFactionsDescription() { - // Aliases - this.addAliases("description"); - // Parameters this.addParameter(TypeString.get(), "desc", true); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.DESCRIPTION)); this.addRequirements(ReqHasFaction.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java index 8b4200e8..1bb02233 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java @@ -1,19 +1,17 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.Factions; import com.massivecraft.factions.cmd.type.TypeFaction; +import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MFlag; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.EventFactionsDisband; import com.massivecraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.Txt; @@ -25,14 +23,8 @@ public class CmdFactionsDisband extends FactionsCommand public CmdFactionsDisband() { - // Aliases - this.addAliases("disband"); - // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.DISBAND)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java b/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java index bb963bba..c38bb960 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsExpansions.java @@ -3,8 +3,6 @@ package com.massivecraft.factions.cmd; import java.util.Map.Entry; import com.massivecraft.factions.event.EventFactionsExpansions; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.Txt; public class CmdFactionsExpansions extends FactionsCommand @@ -15,11 +13,7 @@ public class CmdFactionsExpansions extends FactionsCommand public CmdFactionsExpansions() { - // Aliases - this.addAliases("expansions"); - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.EXPANSIONS)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java index 3176d383..9680918f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java @@ -5,14 +5,12 @@ import java.util.TreeSet; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; +import com.massivecraft.factions.Factions; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.event.EventFactionsFactionShowAsync; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.PriorityLines; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.mixin.MixinMessage; import com.massivecraft.massivecore.util.Txt; @@ -25,13 +23,10 @@ public class CmdFactionsFaction extends FactionsCommand public CmdFactionsFaction() { // Aliases - this.addAliases("f", "faction", "show", "who"); + this.addAliases("f", "show", "who"); // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FACTION)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java index f6e740a5..3a64dc51 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlag.java @@ -1,8 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - public class CmdFactionsFlag extends FactionsCommand { // -------------------------------------------- // @@ -19,16 +16,10 @@ public class CmdFactionsFlag extends FactionsCommand public CmdFactionsFlag() { - // Aliases - this.addAliases("flag"); - // Children this.addChild(this.cmdFactionsFlagList); this.addChild(this.cmdFactionsFlagShow); this.addChild(this.cmdFactionsFlagSet); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java index 9491d1f1..6ada52fe 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagList.java @@ -3,11 +3,9 @@ package com.massivecraft.factions.cmd; import java.util.ArrayList; import java.util.List; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.MFlag; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.Txt; public class CmdFactionsFlagList extends FactionsCommand @@ -18,14 +16,8 @@ public class CmdFactionsFlagList extends FactionsCommand public CmdFactionsFlagList() { - // Aliases - this.addAliases("list"); - // Parameters this.addParameter(Parameter.getPage()); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java index 8e6b776c..dadd5927 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMFlag; import com.massivecraft.factions.entity.Faction; @@ -8,7 +7,6 @@ import com.massivecraft.factions.entity.MFlag; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.event.EventFactionsFlagChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; public class CmdFactionsFlagSet extends FactionsCommand @@ -19,16 +17,10 @@ public class CmdFactionsFlagSet extends FactionsCommand public CmdFactionsFlagSet() { - // Aliases - this.addAliases("set"); - // Parameters this.addParameter(TypeMFlag.get(), "flag"); this.addParameter(TypeBooleanYes.get(), "yes/no"); this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SET)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java index 8bbf7557..ffe69952 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java @@ -4,13 +4,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMFlag; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MFlag; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.util.Txt; @@ -22,15 +20,9 @@ public class CmdFactionsFlagShow extends FactionsCommand public CmdFactionsFlagShow() { - // Aliases - this.addAliases("show"); - // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); this.addParameter(TypeSet.get(TypeMFlag.get()), "flags", "all", true); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SHOW)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java index 4a05c3c6..71d78e8e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java @@ -4,18 +4,16 @@ import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.BoardColl; +import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MFlag; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.event.EventFactionsHomeTeleport; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.mixin.MixinTeleport; import com.massivecraft.massivecore.mixin.TeleporterException; @@ -24,7 +22,6 @@ import com.massivecraft.massivecore.teleport.Destination; import com.massivecraft.massivecore.teleport.DestinationSimple; import com.massivecraft.massivecore.util.MUtil; - public class CmdFactionsHome extends FactionsCommandHome { // -------------------------------------------- // @@ -33,14 +30,10 @@ public class CmdFactionsHome extends FactionsCommandHome public CmdFactionsHome() { - // Aliases - this.addAliases("home"); - // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.HOME)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java index 2cecf3ff..d3b7a4ff 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInvite.java @@ -1,8 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - public class CmdFactionsInvite extends FactionsCommand { // -------------------------------------------- // @@ -19,17 +16,10 @@ public class CmdFactionsInvite extends FactionsCommand public CmdFactionsInvite() { - // Aliases - this.addAliases("invite"); - // Children this.addChild(this.cmdFactionsInviteAdd); this.addChild(this.cmdFactionsInviteRemove); this.addChild(this.cmdFactionsInviteList); - - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java index 4c897749..2666ff6c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java @@ -4,13 +4,11 @@ import java.util.Collection; import org.bukkit.ChatColor; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsInvitedChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; @@ -22,14 +20,8 @@ public class CmdFactionsInviteAdd extends FactionsCommand // -------------------------------------------- // public CmdFactionsInviteAdd() { - // Aliases - this.addAliases("add"); - // Parameters this.addParameter(TypeSet.get(TypeMPlayer.get()), "players", true); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE_ADD)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java index feba4fd2..03850ade 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java @@ -10,7 +10,6 @@ import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.Txt; @@ -23,15 +22,9 @@ public class CmdFactionsInviteList extends FactionsCommand public CmdFactionsInviteList() { - // Aliases - this.addAliases("list"); - // Parameters this.addParameter(Parameter.getPage()); this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java index 4e6424b7..ec1096c6 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java @@ -7,13 +7,11 @@ import java.util.Set; import org.bukkit.ChatColor; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsInvitedChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; @@ -25,14 +23,8 @@ public class CmdFactionsInviteRemove extends FactionsCommand // -------------------------------------------- // public CmdFactionsInviteRemove() { - // Aliases - this.addAliases("remove"); - // Parameters this.addParameter(TypeSet.get(TypeMPlayer.get()), "players/all", true); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.INVITE_REMOVE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java index 62b7f236..f7f5b8d2 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java @@ -6,14 +6,13 @@ import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPlayer; +import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MFlag; import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.mson.Mson; import com.massivecraft.massivecore.util.Txt; @@ -25,15 +24,9 @@ public class CmdFactionsJoin extends FactionsCommand public CmdFactionsJoin() { - // Aliases - this.addAliases("join"); - // Parameters this.addParameter(TypeFaction.get(), "faction"); this.addParameter(TypeMPlayer.get(), "player", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.JOIN)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index 55daa27c..9b06b1c6 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -3,7 +3,6 @@ package com.massivecraft.factions.cmd; import org.bukkit.ChatColor; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.factions.entity.Faction; @@ -14,7 +13,6 @@ import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.IdUtil; public class CmdFactionsKick extends FactionsCommand @@ -25,14 +23,8 @@ public class CmdFactionsKick extends FactionsCommand public CmdFactionsKick() { - // Aliases - this.addAliases("kick"); - // Parameters this.addParameter(TypeMPlayer.get(), "player"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.KICK)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java b/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java index e8b27a4e..4daa3afc 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsLeave.java @@ -1,8 +1,6 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqHasFaction; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; public class CmdFactionsLeave extends FactionsCommand { @@ -12,11 +10,7 @@ public class CmdFactionsLeave extends FactionsCommand public CmdFactionsLeave() { - // Aliases - this.addAliases("leave"); - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.LEAVE)); this.addRequirements(ReqHasFaction.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsList.java b/src/com/massivecraft/factions/cmd/CmdFactionsList.java index 9885aab4..9f571e36 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsList.java @@ -7,13 +7,11 @@ import org.bukkit.command.CommandSender; import com.massivecraft.factions.FactionListComparator; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.Txt; @@ -26,14 +24,8 @@ public class CmdFactionsList extends FactionsCommand public CmdFactionsList() { - // Aliases - this.addAliases("l", "list"); - // Parameters this.addParameter(Parameter.getPage()); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java index ee9cba54..f0fbd456 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java @@ -5,10 +5,8 @@ import java.util.List; import org.bukkit.Location; import com.massivecraft.factions.Const; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.ps.PS; @@ -21,14 +19,10 @@ public class CmdFactionsMap extends FactionsCommand public CmdFactionsMap() { - // Aliases - this.addAliases("map"); - // Parameters this.addParameter(TypeBooleanYes.get(), "on/off", "once"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MAP)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java index d6c002b8..ee389fa0 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoney.java @@ -1,8 +1,6 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; public class CmdFactionsMoney extends FactionsCommand { @@ -30,13 +28,9 @@ public class CmdFactionsMoney extends FactionsCommand this.addChild(this.cmdMoneyTransferFf); this.addChild(this.cmdMoneyTransferFp); this.addChild(this.cmdMoneyTransferPf); - - // Aliases - this.addAliases("money"); // Requirements this.addRequirements(ReqBankCommandsEnabled.get()); - this.addRequirements(RequirementHasPerm.get(Perm.MONEY)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java index ebd29948..8327cf3e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java @@ -1,12 +1,11 @@ package com.massivecraft.factions.cmd; +import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.integration.Econ; -import com.massivecraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; public class CmdFactionsMoneyBalance extends FactionsCommand { @@ -16,14 +15,10 @@ public class CmdFactionsMoneyBalance extends FactionsCommand public CmdFactionsMoneyBalance() { - // Aliases - this.addAliases("balance"); - // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_BALANCE)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java index 456524fc..23507086 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -1,20 +1,18 @@ package com.massivecraft.factions.cmd; +import org.bukkit.ChatColor; + import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; -import org.bukkit.ChatColor; - public class CmdFactionsMoneyDeposit extends FactionsCommand { // -------------------------------------------- // @@ -23,15 +21,11 @@ public class CmdFactionsMoneyDeposit extends FactionsCommand public CmdFactionsMoneyDeposit() { - // Aliases - this.addAliases("deposit"); - // Parameters this.addParameter(TypeDouble.get(), "amount"); this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_DEPOSIT)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java index 3e2e87d5..6bd1fc85 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java @@ -1,11 +1,13 @@ package com.massivecraft.factions.cmd; +import org.bukkit.ChatColor; + +import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.Factions; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; @@ -13,9 +15,6 @@ import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; -import org.bukkit.ChatColor; - - public class CmdFactionsMoneyTransferFf extends FactionsCommand { // -------------------------------------------- // @@ -24,6 +23,9 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand public CmdFactionsMoneyTransferFf() { + // Fields + this.setSetupEnabled(false); + // Aliases this.addAliases("ff"); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java index f1e431da..b38404fd 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java @@ -1,13 +1,15 @@ package com.massivecraft.factions.cmd; +import org.bukkit.ChatColor; + +import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.Factions; +import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; @@ -15,9 +17,6 @@ import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; -import org.bukkit.ChatColor; - - public class CmdFactionsMoneyTransferFp extends FactionsCommand { // -------------------------------------------- // @@ -26,6 +25,9 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand public CmdFactionsMoneyTransferFp() { + // Fields + this.setSetupEnabled(false); + // Aliases this.addAliases("fp"); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java index 03e43fe9..ab229e68 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java @@ -1,13 +1,15 @@ package com.massivecraft.factions.cmd; +import org.bukkit.ChatColor; + +import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.Factions; +import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.integration.Econ; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; @@ -15,9 +17,6 @@ import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.money.Money; import com.massivecraft.massivecore.util.Txt; -import org.bukkit.ChatColor; - - public class CmdFactionsMoneyTransferPf extends FactionsCommand { // -------------------------------------------- // @@ -26,6 +25,9 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand public CmdFactionsMoneyTransferPf() { + // Fields + this.setSetupEnabled(false); + // Aliases this.addAliases("pf"); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java index 564efbd1..f9342177 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -1,21 +1,18 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; -import com.massivecraft.factions.cmd.type.TypeFaction; -import com.massivecraft.factions.entity.MPlayer; -import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.MConf; -import com.massivecraft.factions.Factions; -import com.massivecraft.factions.integration.Econ; -import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; -import com.massivecraft.massivecore.command.type.primitive.TypeDouble; -import com.massivecraft.massivecore.money.Money; -import com.massivecraft.massivecore.util.Txt; - import org.bukkit.ChatColor; +import com.massivecraft.factions.Factions; +import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; +import com.massivecraft.factions.cmd.type.TypeFaction; +import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; +import com.massivecraft.factions.entity.MPlayer; +import com.massivecraft.factions.integration.Econ; +import com.massivecraft.massivecore.MassiveException; +import com.massivecraft.massivecore.command.type.primitive.TypeDouble; +import com.massivecraft.massivecore.money.Money; +import com.massivecraft.massivecore.util.Txt; public class CmdFactionsMoneyWithdraw extends FactionsCommand { @@ -25,15 +22,11 @@ public class CmdFactionsMoneyWithdraw extends FactionsCommand public CmdFactionsMoneyWithdraw() { - // Aliases - this.addAliases("withdraw"); - // Parameters this.addParameter(TypeDouble.get(), "amount"); this.addParameter(TypeFaction.get(), "faction", "you"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MONEY_WITHDRAW)); this.addRequirements(ReqBankCommandsEnabled.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java index 79a2791d..e7f1a81c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java @@ -1,12 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsMotdChange; import com.massivecraft.massivecore.MassiveCore; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.mixin.MixinDisplayName; import com.massivecraft.massivecore.util.MUtil; @@ -20,14 +18,8 @@ public class CmdFactionsMotd extends FactionsCommand public CmdFactionsMotd() { - // Aliases - this.addAliases("motd"); - // Parameters this.addParameter(TypeString.get(), "new", "read", true); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.MOTD)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsName.java b/src/com/massivecraft/factions/cmd/CmdFactionsName.java index c16411e8..5bcabf8c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsName.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsName.java @@ -2,7 +2,6 @@ package com.massivecraft.factions.cmd; import java.util.ArrayList; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; @@ -10,7 +9,6 @@ import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.event.EventFactionsNameChange; import com.massivecraft.factions.util.MiscUtil; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeString; public class CmdFactionsName extends FactionsCommand @@ -21,15 +19,9 @@ public class CmdFactionsName extends FactionsCommand public CmdFactionsName() { - // Aliases - this.addAliases("name"); - // Parameters this.addParameter(TypeString.get(), "new name"); this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.NAME)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java b/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java index cc38f6c7..a2326e4f 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsOverride.java @@ -1,9 +1,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.Txt; @@ -17,13 +15,10 @@ public class CmdFactionsOverride extends FactionsCommand public CmdFactionsOverride() { // Aliases - this.addAliases("override", "admin"); + this.addAliases("admin"); // Parameters this.addParameter(TypeBooleanYes.get(), "on/off", "flip"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.OVERRIDE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java index 5fd2f928..11cfa445 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPerm.java @@ -1,8 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - public class CmdFactionsPerm extends FactionsCommand { // -------------------------------------------- // @@ -19,16 +16,10 @@ public class CmdFactionsPerm extends FactionsCommand public CmdFactionsPerm() { - // Aliases - this.addAliases("perm"); - // Children this.addChild(this.cmdFactionsPermList); this.addChild(this.cmdFactionsPermShow); this.addChild(this.cmdFactionsPermSet); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java index ee9e2355..34ab79bd 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermList.java @@ -3,11 +3,9 @@ package com.massivecraft.factions.cmd; import java.util.ArrayList; import java.util.List; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.Txt; public class CmdFactionsPermList extends FactionsCommand @@ -18,14 +16,8 @@ public class CmdFactionsPermList extends FactionsCommand public CmdFactionsPermList() { - // Aliases - this.addAliases("list"); - // Parameters this.addParameter(Parameter.getPage()); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java index 719bd61d..6b8bc12b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermSet.java @@ -3,7 +3,6 @@ package com.massivecraft.factions.cmd; import java.util.ArrayList; import java.util.List; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPerm; @@ -13,7 +12,6 @@ import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsPermChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes; import com.massivecraft.massivecore.util.Txt; @@ -25,17 +23,11 @@ public class CmdFactionsPermSet extends FactionsCommand public CmdFactionsPermSet() { - // Aliases - this.addAliases("set"); - // Parameters this.addParameter(TypeMPerm.get(), "perm"); this.addParameter(TypeRel.get(), "relation"); this.addParameter(TypeBooleanYes.get(), "yes/no"); this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM_SET)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java index c09cbcac..84d7a076 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPermShow.java @@ -4,13 +4,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPerm; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.util.Txt; @@ -22,15 +20,9 @@ public class CmdFactionsPermShow extends FactionsCommand public CmdFactionsPermShow() { - // Aliases - this.addAliases("show"); - // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); this.addParameter(TypeSet.get(TypeMPerm.get()), "perms", "all", true); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PERM_SHOW)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java index 247d8841..2c2151dc 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPlayer.java @@ -3,14 +3,12 @@ package com.massivecraft.factions.cmd; import java.util.LinkedHashMap; import java.util.Map.Entry; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeMPlayer; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsRemovePlayerMillis; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.Progressbar; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; @@ -23,14 +21,8 @@ public class CmdFactionsPlayer extends FactionsCommand public CmdFactionsPlayer() { - // Aliases - this.addAliases("p", "player"); - // Parameters this.addParameter(TypeMPlayer.get(), "player", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.PLAYER)); } // -------------------------------------------- // @@ -111,4 +103,4 @@ public class CmdFactionsPlayer extends FactionsCommand return TimeDiffUtil.formatedVerboose(unitcounts); } -} \ 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 ea93656a..ba0c418e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsPowerBoost.java @@ -1,14 +1,12 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeMPlayer; -import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeDouble; import com.massivecraft.massivecore.command.type.primitive.TypeString; @@ -27,16 +25,10 @@ public class CmdFactionsPowerBoost extends FactionsCommand public CmdFactionsPowerBoost() { - // Aliases - this.addAliases("powerboost"); - // Parameters this.addParameter(TypeString.get(), "p|f|player|faction"); this.addParameter(parameterMplayer); this.addParameter(TypeDouble.get(), "#"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.POWERBOOST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRank.java b/src/com/massivecraft/factions/cmd/CmdFactionsRank.java index f73fdce8..cbe6aedb 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRank.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRank.java @@ -18,7 +18,6 @@ import com.massivecraft.factions.event.EventFactionsMembershipChange; import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason; import com.massivecraft.factions.event.EventFactionsRankChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.util.Txt; public class CmdFactionsRank extends FactionsCommand @@ -54,16 +53,10 @@ public class CmdFactionsRank extends FactionsCommand public CmdFactionsRank() { - // Aliases - this.addAliases("rank"); - // Parameters this.addParameter(TypeMPlayer.get(), "player"); this.addParameter(TypeRank.get(), "action", "show"); this.addParameter(TypeFaction.get(), "faction", "their"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RANK)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java b/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java index ba8b5f11..0dfa072c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRankOld.java @@ -21,6 +21,7 @@ public class CmdFactionsRankOld extends FactionsCommand { // Fields this.rankName = rank.toLowerCase(); + this.setSetupEnabled(false); // Aliases this.addAliases(rankName); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java index 26e07468..63f5c092 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelation.java @@ -1,9 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; - -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - public class CmdFactionsRelation extends FactionsCommand { // -------------------------------------------- // @@ -24,12 +20,6 @@ public class CmdFactionsRelation extends FactionsCommand this.addChild(this.cmdFactionsRelationSet); this.addChild(this.cmdFactionsRelationList); this.addChild(this.cmdFactionsRelationWishes); - - // Aliases - this.addAliases("relation"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java index 5ab7ce6b..e09920ad 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationList.java @@ -7,18 +7,15 @@ import java.util.Set; import org.bukkit.Bukkit; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeRelation; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; - import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveList; import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.container.TypeSet; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; @@ -39,16 +36,10 @@ public class CmdFactionsRelationList extends FactionsCommand public CmdFactionsRelationList() { - // Aliases - this.addAliases("list"); - // Parameter this.addParameter(Parameter.getPage()); this.addParameter(TypeFaction.get(), "faction", "you"); this.addParameter(TypeSet.get(TypeRelation.get()), "relations", "all"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION_LIST)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java index 8de3d72f..3a537400 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationOld.java @@ -22,6 +22,7 @@ public class CmdFactionsRelationOld extends FactionsCommand { // Fields this.relName = rel.toLowerCase(); + this.setSetupEnabled(false); // Aliases this.addAliases(relName); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java index aa36d829..165da708 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationSet.java @@ -2,7 +2,6 @@ package com.massivecraft.factions.cmd; import org.bukkit.ChatColor; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeRelation; @@ -10,10 +9,8 @@ import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MFlag; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.event.EventFactionsRelationChange; - import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.MassiveCommand; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.mson.Mson; public class CmdFactionsRelationSet extends FactionsCommand @@ -24,15 +21,9 @@ public class CmdFactionsRelationSet extends FactionsCommand public CmdFactionsRelationSet() { - // Aliases - this.addAliases("set"); - // Parameter this.addParameter(TypeFaction.get(), "faction"); this.addParameter(TypeRelation.get(), "relation"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION_SET)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java b/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java index dadf7d50..2c9236b8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsRelationWishes.java @@ -6,16 +6,13 @@ import java.util.Map.Entry; import org.bukkit.Bukkit; import com.massivecraft.factions.Factions; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; - import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.MUtil; @@ -29,15 +26,9 @@ public class CmdFactionsRelationWishes extends FactionsCommand public CmdFactionsRelationWishes() { - // Aliases - this.addAliases("wishes"); - // Parameter this.addParameter(Parameter.getPage()); this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.RELATION_WISHES)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java index 9d6e212f..8c0ff847 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunk.java @@ -1,8 +1,6 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanOn; import com.massivecraft.massivecore.util.Txt; @@ -16,13 +14,12 @@ public class CmdFactionsSeeChunk extends FactionsCommand public CmdFactionsSeeChunk() { // Aliases - this.addAliases("sc", "seechunk"); + this.addAliases("sc"); // Parameters this.addParameter(TypeBooleanOn.get(), "active", "toggle"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNK)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java index ac4502cf..acbde37c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSeeChunkOld.java @@ -5,9 +5,7 @@ import org.bukkit.Material; import org.bukkit.World; import org.bukkit.entity.Player; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.util.VisualizeUtil; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.ps.PSFormatHumanSpace; @@ -21,10 +19,9 @@ public class CmdFactionsSeeChunkOld extends FactionsCommand public CmdFactionsSeeChunkOld() { // Aliases - this.addAliases("sco", "seechunkold"); + this.addAliases("sco"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNKOLD)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java index 6656a018..eecac782 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetAuto.java @@ -32,6 +32,7 @@ public class CmdFactionsSetAuto extends FactionsCommand { // Fields this.setClaim(claim); + this.setSetupEnabled(false); // Aliases this.addAliases("auto"); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsSetX.java b/src/com/massivecraft/factions/cmd/CmdFactionsSetX.java index 28d3b0f4..64eaa7dd 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsSetX.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsSetX.java @@ -36,6 +36,7 @@ public abstract class CmdFactionsSetX extends FactionsCommand public CmdFactionsSetX(boolean claim) { this.setClaim(claim); + this.setSetupEnabled(false); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java index 3184c303..a058b3ba 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java @@ -5,7 +5,6 @@ import java.util.Comparator; import java.util.LinkedHashMap; import java.util.List; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.PlayerInactivityComparator; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeSortMPlayer; @@ -14,14 +13,12 @@ import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Parameter; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.pager.Pager; import com.massivecraft.massivecore.pager.Stringifier; import com.massivecraft.massivecore.util.TimeDiffUtil; import com.massivecraft.massivecore.util.TimeUnit; import com.massivecraft.massivecore.util.Txt; - public class CmdFactionsStatus extends FactionsCommand { // -------------------------------------------- // @@ -30,16 +27,10 @@ public class CmdFactionsStatus extends FactionsCommand public CmdFactionsStatus() { - // Aliases - this.addAliases("s", "status"); - // Parameters this.addParameter(Parameter.getPage()); this.addParameter(TypeFaction.get(), "faction", "you"); this.addParameter(TypeSortMPlayer.get(), "sort", "time"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.STATUS)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java b/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java index 5ab209d6..078b79ba 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsTerritorytitles.java @@ -1,9 +1,7 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.command.Visibility; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementTitlesAvailable; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanOn; import com.massivecraft.massivecore.mixin.MixinTitle; @@ -18,13 +16,12 @@ public class CmdFactionsTerritorytitles extends FactionsCommand public CmdFactionsTerritorytitles() { // Aliases - this.addAliases("tt", "territorytitles"); + this.addAliases("tt"); // Parameters this.addParameter(TypeBooleanOn.get(), "on|off", "toggle"); // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.TERRITORYTITLES)); this.addRequirements(RequirementTitlesAvailable.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java index 8a94a3f1..067a7b53 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsTitle.java @@ -8,7 +8,6 @@ import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.event.EventFactionsTitleChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.type.primitive.TypeString; import com.massivecraft.massivecore.util.Txt; @@ -20,15 +19,9 @@ public class CmdFactionsTitle extends FactionsCommand public CmdFactionsTitle() { - // Aliases - this.addAliases("title"); - // Parameters this.addParameter(TypeMPlayer.get(), "player"); this.addParameter(TypeString.get(), "title", "", true); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.TITLE)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java index 5c6f0cb4..9d78d1e3 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java @@ -1,9 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; - - public class CmdFactionsUnclaim extends FactionsCommand { // -------------------------------------------- // @@ -23,9 +19,6 @@ public class CmdFactionsUnclaim extends FactionsCommand public CmdFactionsUnclaim() { - // Aliases - this.addAliases("unclaim"); - // Children this.addChild(this.cmdFactionsUnclaimOne); this.addChild(this.cmdFactionsUnclaimAuto); @@ -33,9 +26,6 @@ public class CmdFactionsUnclaim extends FactionsCommand this.addChild(this.cmdFactionsUnclaimSquare); this.addChild(this.cmdFactionsUnclaimCircle); this.addChild(this.cmdFactionsUnclaimAll); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.UNCLAIM)); } } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java index 6c85a2c9..7d49cf55 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnsethome.java @@ -1,12 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.event.EventFactionsHomeChange; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; public class CmdFactionsUnsethome extends FactionsCommandHome { @@ -16,14 +14,8 @@ public class CmdFactionsUnsethome extends FactionsCommandHome public CmdFactionsUnsethome() { - // Aliases - this.addAliases("unsethome"); - // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); - - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.UNSETHOME)); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java index 5594aa3a..5510ef48 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnstuck.java @@ -6,7 +6,6 @@ import java.util.List; import org.bukkit.Location; import org.bukkit.World; -import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; @@ -14,7 +13,6 @@ import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.MassiveException; -import com.massivecraft.massivecore.command.requirement.RequirementHasPerm; import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer; import com.massivecraft.massivecore.mixin.MixinTeleport; import com.massivecraft.massivecore.mixin.TeleporterException; @@ -30,11 +28,7 @@ public class CmdFactionsUnstuck extends FactionsCommand public CmdFactionsUnstuck() { - // Aliases - this.addAliases("unstuck"); - // Requirements - this.addRequirements(RequirementHasPerm.get(Perm.UNSTUCK)); this.addRequirements(RequirementIsPlayer.get()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java b/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java index c9b6243d..cf96daac 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java @@ -16,6 +16,7 @@ public class CmdFactionsXPlaceholder extends FactionsCommand { // Fields this.extensionName = extensionName; + this.setSetupEnabled(false); // Aliases this.addAliases(aliases); diff --git a/src/com/massivecraft/factions/cmd/FactionsCommand.java b/src/com/massivecraft/factions/cmd/FactionsCommand.java index a5fb8393..a89e7c9b 100644 --- a/src/com/massivecraft/factions/cmd/FactionsCommand.java +++ b/src/com/massivecraft/factions/cmd/FactionsCommand.java @@ -1,7 +1,7 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.command.MassiveCommand; public class FactionsCommand extends MassiveCommand @@ -12,7 +12,16 @@ public class FactionsCommand extends MassiveCommand public MPlayer msender; public Faction msenderFaction; - + + // -------------------------------------------- // + // CONSTRUCT + // -------------------------------------------- // + + public FactionsCommand() + { + this.setSetupEnabled(true); + } + // -------------------------------------------- // // OVERRIDE // -------------------------------------------- // @@ -23,5 +32,5 @@ public class FactionsCommand extends MassiveCommand this.msender = set ? MPlayer.get(sender) : null; this.msenderFaction = set ? this.msender.getFaction() : null; } - + }