From 1e2089239296b72ae4a9712826ec14e900c88410 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Fri, 1 Feb 2019 09:14:04 +0100 Subject: [PATCH] Add some parameter descriptions there are more to come --- src/com/massivecraft/factions/cmd/CmdFactionsCreate.java | 2 +- .../factions/cmd/CmdFactionsDescription.java | 2 +- .../factions/cmd/CmdFactionsDocumentationWarps.java | 4 ++-- .../massivecraft/factions/cmd/CmdFactionsFaction.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsFlagSet.java | 6 +++--- .../massivecraft/factions/cmd/CmdFactionsFlagShow.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsInviteAdd.java | 2 +- .../massivecraft/factions/cmd/CmdFactionsInviteList.java | 2 +- .../factions/cmd/CmdFactionsInviteRemove.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsJoin.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdFactionsKick.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsMap.java | 2 +- .../factions/cmd/CmdFactionsMoneyBalance.java | 2 +- .../factions/cmd/CmdFactionsMoneyDeposit.java | 4 ++-- .../factions/cmd/CmdFactionsMoneyTransferFf.java | 6 +++--- .../factions/cmd/CmdFactionsMoneyTransferFp.java | 6 +++--- .../factions/cmd/CmdFactionsMoneyTransferPf.java | 6 +++--- .../factions/cmd/CmdFactionsMoneyWithdraw.java | 4 ++-- src/com/massivecraft/factions/cmd/CmdFactionsMotd.java | 2 +- src/com/massivecraft/factions/cmd/CmdFactionsName.java | 9 ++------- src/com/massivecraft/factions/cmd/CmdFactionsStatus.java | 4 ++-- 21 files changed, 35 insertions(+), 40 deletions(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java index 0be40103..d500cbce 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java @@ -26,7 +26,7 @@ public class CmdFactionsCreate extends FactionsCommand this.addAliases("new"); // Parameters - this.addParameter(TypeFactionNameStrict.get(), "name"); + this.addParameter(TypeFactionNameStrict.get(), "name").setDesc("the name of your new faction"); // Requirements this.addRequirements(ReqHasntFaction.get()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java index 3ccbdd5a..5e1ae9ea 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDescription.java @@ -17,7 +17,7 @@ public class CmdFactionsDescription extends FactionsCommand public CmdFactionsDescription() { // Parameters - this.addParameter(TypeString.get(), "desc", true); + this.addParameter(TypeString.get(), "desc", true).setDesc("the new faction desciption"); // Requirements this.addRequirements(ReqHasFaction.get()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java b/src/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java index b00664dd..0b36a392 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDocumentationWarps.java @@ -30,11 +30,11 @@ public class CmdFactionsDocumentationWarps extends FactionsCommandDocumentation if (MConf.get().warpsMax < 0) { - msgDoc("There is no limit to how many warps a faction can have."); + msgDoc("There is no limit to how many warps a faction can have."); } else { - msgDoc("There is no limit to how many warps a faction can have."); + msgDoc("A faction can only have %d warps.", MConf.get().warpsMax); } if (MConf.get().warpsMustBeInClaimedTerritory) diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java index 30f9cf76..f7ae98e7 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFaction.java @@ -22,7 +22,7 @@ public class CmdFactionsFaction extends FactionsCommand public CmdFactionsFaction() { // Aliases - this.addAliases("f", "show", "who"); + this.addAliases("f", "show", "who").setDesc("the faction to show info about"); // Parameters this.addParameter(TypeFaction.get(), "faction", "you"); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java index dadd5927..5a846bb4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagSet.java @@ -18,9 +18,9 @@ public class CmdFactionsFlagSet extends FactionsCommand public CmdFactionsFlagSet() { // Parameters - this.addParameter(TypeMFlag.get(), "flag"); - this.addParameter(TypeBooleanYes.get(), "yes/no"); - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeMFlag.get(), "flag").setDesc("the faction flag to set a value for"); + this.addParameter(TypeBooleanYes.get(), "yes/no").setDesc("should the flag be on or off?"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction to set the flag for (per default your own)"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java index cd077b66..59c9bea5 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsFlagShow.java @@ -20,7 +20,7 @@ public class CmdFactionsFlagShow extends FactionsCommand public CmdFactionsFlagShow() { // Parameters - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction to show flags for"); this.addParameter(Parameter.getPage()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java index 385edd03..86701c5b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteAdd.java @@ -23,7 +23,7 @@ public class CmdFactionsInviteAdd extends FactionsCommand public CmdFactionsInviteAdd() { // Parameters - this.addParameter(TypeSet.get(TypeMPlayer.get()), "players", true); + this.addParameter(TypeSet.get(TypeMPlayer.get()), "players", true).setDesc("the player to invite"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java index b59de368..f72f94cf 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteList.java @@ -32,7 +32,7 @@ public class CmdFactionsInviteList extends FactionsCommand { // Parameters this.addParameter(Parameter.getPage()); - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction to list invites for"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java index 71219466..0ab92db9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsInviteRemove.java @@ -23,7 +23,7 @@ public class CmdFactionsInviteRemove extends FactionsCommand public CmdFactionsInviteRemove() { // Parameters - this.addParameter(TypeSet.get(TypeMPlayer.get()), "players/all", true); + this.addParameter(TypeSet.get(TypeMPlayer.get()), "players/all", true).setDesc("the player to deinvite"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java index d3355dcc..15828c09 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java @@ -24,8 +24,8 @@ public class CmdFactionsJoin extends FactionsCommand public CmdFactionsJoin() { // Parameters - this.addParameter(TypeFaction.get(), "faction"); - this.addParameter(TypeMPlayer.get(), "player", "you"); + this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to join"); + this.addParameter(TypeMPlayer.get(), "player", "you").setDesc("the player that should join tje faction (for admins only)"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index a374dfcf..d404f00e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -22,7 +22,7 @@ public class CmdFactionsKick extends FactionsCommand public CmdFactionsKick() { // Parameters - this.addParameter(TypeMPlayer.get(), "player"); + this.addParameter(TypeMPlayer.get(), "player").setDesc("the player to kick"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java index 52277864..55517c3e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMap.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMap.java @@ -15,7 +15,7 @@ public class CmdFactionsMap extends FactionsCommand public CmdFactionsMap() { // Parameters - this.addParameter(TypeBooleanYes.get(), "on/off", "once"); + this.addParameter(TypeBooleanYes.get(), "on/off", "once").setDesc("set to yes to get an auto updating map\nset to no to disable"); // Requirements this.addRequirements(RequirementIsPlayer.get()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java index 8327cf3e..15cac3b4 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java @@ -16,7 +16,7 @@ public class CmdFactionsMoneyBalance extends FactionsCommand public CmdFactionsMoneyBalance() { // Parameters - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction whose balance to check"); // Requirements this.addRequirements(ReqBankCommandsEnabled.get()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java index c6de3e6d..ccb4abcf 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -21,8 +21,8 @@ public class CmdFactionsMoneyDeposit extends FactionsCommand public CmdFactionsMoneyDeposit() { // Parameters - this.addParameter(TypeDouble.get(), "amount"); - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeDouble.get(), "amount").setDesc("the amount of money to deposit"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction to deposit money to"); // Requirements this.addRequirements(ReqBankCommandsEnabled.get()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java index bb233d19..eae43e25 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java @@ -29,9 +29,9 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand this.addAliases("ff"); // Parameters - this.addParameter(TypeDouble.get(), "amount"); - this.addParameter(TypeFaction.get(), "faction"); - this.addParameter(TypeFaction.get(), "faction"); + this.addParameter(TypeDouble.get(), "amount").setDesc("the amount of money to transfer"); + this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to transfer money from"); + this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to transfer money to"); // Requirements this.addRequirements(RequirementHasPerm.get(Perm.MONEY_F2F)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java index 3d9866bc..9a04bc79 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java @@ -31,9 +31,9 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand this.addAliases("fp"); // Parameters - this.addParameter(TypeDouble.get(), "amount"); - this.addParameter(TypeFaction.get(), "faction"); - this.addParameter(TypeMPlayer.get(), "player"); + this.addParameter(TypeDouble.get(), "amount").setDesc("the amount of money to transfer"); + this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to transfer money from"); + this.addParameter(TypeMPlayer.get(), "player").setDesc("the player to transfer money to"); // Requirements this.addRequirements(RequirementHasPerm.get(Perm.MONEY_F2P)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java index 7c3a7fb2..accf024b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java @@ -31,9 +31,9 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand this.addAliases("pf"); // Parameters - this.addParameter(TypeDouble.get(), "amount"); - this.addParameter(TypeMPlayer.get(), "player"); - this.addParameter(TypeFaction.get(), "faction"); + this.addParameter(TypeDouble.get(), "amount").setDesc("the amount of money to transfer"); + this.addParameter(TypeMPlayer.get(), "player").setDesc("the player to transfer money from"); + this.addParameter(TypeFaction.get(), "faction").setDesc("the faction to transfer money to"); // Requirements this.addRequirements(RequirementHasPerm.get(Perm.MONEY_P2F)); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java index 8afb3941..03f98e1e 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -22,8 +22,8 @@ public class CmdFactionsMoneyWithdraw extends FactionsCommand public CmdFactionsMoneyWithdraw() { // Parameters - this.addParameter(TypeDouble.get(), "amount"); - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeDouble.get(), "amount").setDesc("the amount of money to withdraw"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction to transfer money to"); // Requirements this.addRequirements(ReqBankCommandsEnabled.get()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java index 35e868f6..e4d22928 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMotd.java @@ -19,7 +19,7 @@ public class CmdFactionsMotd extends FactionsCommand public CmdFactionsMotd() { // Parameters - this.addParameter(TypeNullable.get(TypeString.get()), "new", "read", true); + this.addParameter(TypeNullable.get(TypeString.get()), "new", "read", true).setDesc("the new motd\nif not specified you will just see the current one"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsName.java b/src/com/massivecraft/factions/cmd/CmdFactionsName.java index 3511a56e..7542d1c3 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsName.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsName.java @@ -3,14 +3,9 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.cmd.type.TypeFaction; import com.massivecraft.factions.cmd.type.TypeFactionNameLenient; import com.massivecraft.factions.entity.Faction; -import com.massivecraft.factions.entity.FactionColl; 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.type.primitive.TypeString; - -import java.util.ArrayList; public class CmdFactionsName extends FactionsCommand { @@ -21,8 +16,8 @@ public class CmdFactionsName extends FactionsCommand public CmdFactionsName() { // Parameters - this.addParameter(TypeFactionNameLenient.get(), "new name"); - this.addParameter(TypeFaction.get(), "faction", "you"); + this.addParameter(TypeFactionNameLenient.get(), "new name").setDesc("the new name of the faction"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction whose name to change"); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java index 037198c7..5985c9d9 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsStatus.java @@ -28,8 +28,8 @@ public class CmdFactionsStatus extends FactionsCommand { // Parameters this.addParameter(Parameter.getPage()); - this.addParameter(TypeFaction.get(), "faction", "you"); - this.addParameter(TypeSortMPlayer.get(), "sort", "time"); + this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction whose status to see"); + this.addParameter(TypeSortMPlayer.get(), "sort", "time").setDesc("sort mplayers by rank, power or last active time?"); } // -------------------------------------------- //