More work at streamlining the command constructor content
This commit is contained in:
parent
4c0adc523a
commit
a84582ba21
@ -16,15 +16,14 @@ public class CmdFactionsAccess extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsAccess()
|
public CmdFactionsAccess()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("access");
|
this.addAliases("access");
|
||||||
|
|
||||||
this.optionalArgs.put("view|p|player|f|faction", "view");
|
this.addOptionalArg("view|p|player|f|faction", "view");
|
||||||
this.optionalArgs.put("name", "you");
|
this.addOptionalArg("name", "you");
|
||||||
|
|
||||||
this.setHelpShort("view or grant access for the claimed territory you are in");
|
this.setHelpShort("view or grant access for the claimed territory you are in");
|
||||||
|
|
||||||
|
// TODO: Missing permission node here!
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,11 +8,9 @@ public class CmdFactionsAdmin extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsAdmin()
|
public CmdFactionsAdmin()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("admin");
|
this.addAliases("admin");
|
||||||
|
|
||||||
this.optionalArgs.put("on/off", "flip");
|
this.addOptionalArg("on/off", "flip");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));
|
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,9 @@ public class CmdFactionsAutoClaim extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsAutoClaim()
|
public CmdFactionsAutoClaim()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("autoclaim");
|
this.addAliases("autoclaim");
|
||||||
|
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("faction", "you");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.AUTOCLAIM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.AUTOCLAIM.node));
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
|
@ -12,8 +12,6 @@ public class CmdFactionsCape extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsCape()
|
public CmdFactionsCape()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("cape");
|
this.addAliases("cape");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE.node));
|
||||||
|
@ -14,7 +14,7 @@ public abstract class CmdFactionsCapeAbstract extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsCapeAbstract()
|
public CmdFactionsCapeAbstract()
|
||||||
{
|
{
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("faction", "you");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,6 +10,7 @@ public class CmdFactionsCapeRemove extends CmdFactionsCapeAbstract
|
|||||||
public CmdFactionsCapeRemove()
|
public CmdFactionsCapeRemove()
|
||||||
{
|
{
|
||||||
this.addAliases("rm", "rem", "remove", "del", "delete");
|
this.addAliases("rm", "rem", "remove", "del", "delete");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE_REMOVE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE_REMOVE.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class CmdFactionsCapeSet extends CmdFactionsCapeAbstract
|
|||||||
{
|
{
|
||||||
this.addAliases("set");
|
this.addAliases("set");
|
||||||
|
|
||||||
this.requiredArgs.add("url");
|
this.addRequiredArg("url");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.CAPE_SET.node));
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE_SET.node));
|
||||||
}
|
}
|
||||||
|
@ -14,16 +14,12 @@ public class CmdFactionsClaim extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsClaim()
|
public CmdFactionsClaim()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("claim");
|
this.addAliases("claim");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("faction", "you");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("radius", "1");
|
||||||
this.optionalArgs.put("radius", "1");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,12 +21,9 @@ public class CmdFactionsCreate extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsCreate()
|
public CmdFactionsCreate()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("create");
|
this.addAliases("create");
|
||||||
|
|
||||||
this.requiredArgs.add("faction tag");
|
this.addRequiredArg("faction tag");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.CREATE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.CREATE.node));
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,9 @@ public class CmdFactionsDeinvite extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsDeinvite()
|
public CmdFactionsDeinvite()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("deinvite", "deinv");
|
this.addAliases("deinvite", "deinv");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.DEINVITE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.DEINVITE.node));
|
||||||
|
|
||||||
|
@ -10,12 +10,9 @@ public class CmdFactionsDemote extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsDemote()
|
public CmdFactionsDemote()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("demote");
|
this.addAliases("demote");
|
||||||
|
|
||||||
this.requiredArgs.add("player name");
|
this.addRequiredArg("player");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.DEMOTE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.DEMOTE.node));
|
||||||
|
|
||||||
|
@ -11,13 +11,10 @@ public class CmdFactionsDescription extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsDescription()
|
public CmdFactionsDescription()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("desc");
|
this.addAliases("desc");
|
||||||
|
|
||||||
this.requiredArgs.add("desc");
|
this.addRequiredArg("desc");
|
||||||
this.errorOnToManyArgs = false;
|
this.setErrorOnToManyArgs(false);
|
||||||
//this.optionalArgs
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));
|
||||||
|
|
||||||
|
@ -20,12 +20,9 @@ public class CmdFactionsDisband extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsDisband()
|
public CmdFactionsDisband()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("disband");
|
this.addAliases("disband");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("faction", "you");
|
||||||
this.optionalArgs.put("faction", "your");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));
|
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));
|
||||||
}
|
}
|
||||||
|
@ -11,14 +11,11 @@ public class CmdFactionsFlag extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsFlag()
|
public CmdFactionsFlag()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("flag");
|
this.addAliases("flag");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("faction", "you");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("flag", "all");
|
||||||
this.optionalArgs.put("flag", "all");
|
this.addOptionalArg("yes/no", "read");
|
||||||
this.optionalArgs.put("yes/no", "read");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));
|
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));
|
||||||
}
|
}
|
||||||
|
@ -24,18 +24,11 @@ import com.massivecraft.mcore.util.SmokeUtil;
|
|||||||
|
|
||||||
public class CmdFactionsHome extends FCommand
|
public class CmdFactionsHome extends FCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
public CmdFactionsHome()
|
public CmdFactionsHome()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("home");
|
this.addAliases("home");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
|
this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
|
|
||||||
senderMustBeMember = true;
|
senderMustBeMember = true;
|
||||||
|
@ -11,12 +11,9 @@ public class CmdFactionsInvite extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsInvite()
|
public CmdFactionsInvite()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("inv", "invite");
|
this.addAliases("inv", "invite");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.INVITE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.INVITE.node));
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
|
@ -15,12 +15,10 @@ public class CmdFactionsJoin extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsJoin()
|
public CmdFactionsJoin()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("join");
|
this.addAliases("join");
|
||||||
|
|
||||||
this.requiredArgs.add("faction");
|
this.addRequiredArg("faction");
|
||||||
this.optionalArgs.put("player", "you");
|
this.addOptionalArg("player", "you");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));
|
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,9 @@ public class CmdFactionsKick extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsKick()
|
public CmdFactionsKick()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("kick");
|
this.addAliases("kick");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
|
this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,10 @@ public class CmdFactionsLeader extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsLeader()
|
public CmdFactionsLeader()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("leader");
|
this.addAliases("leader");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("faction", "you");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.LEADER.node));
|
this.addRequirements(ReqHasPerm.get(Perm.LEADER.node));
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,6 @@ public class CmdFactionsLeave extends FCommand {
|
|||||||
|
|
||||||
public CmdFactionsLeave()
|
public CmdFactionsLeave()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("leave");
|
this.addAliases("leave");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.LEAVE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.LEAVE.node));
|
||||||
|
@ -17,12 +17,9 @@ public class CmdFactionsList extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsList()
|
public CmdFactionsList()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("ls", "list");
|
this.addAliases("ls", "list");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("page", "1");
|
||||||
this.optionalArgs.put("page", "1");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.LIST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.LIST.node));
|
||||||
}
|
}
|
||||||
|
@ -12,14 +12,11 @@ public class CmdFactionsMap extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsMap()
|
public CmdFactionsMap()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("map");
|
this.addAliases("map");
|
||||||
|
|
||||||
this.optionalArgs.put("on/off", "once");
|
this.addOptionalArg("on/off", "once");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MAP.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MAP.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,6 @@ public class CmdFactionsMoney extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsMoney()
|
public CmdFactionsMoney()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("money");
|
this.addAliases("money");
|
||||||
|
|
||||||
this.isMoneyCommand = true;
|
this.isMoneyCommand = true;
|
||||||
|
@ -9,21 +9,13 @@ public class CmdFactionsMoneyBalance extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsMoneyBalance()
|
public CmdFactionsMoneyBalance()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("b", "balance");
|
this.addAliases("b", "balance");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("faction", "you");
|
||||||
this.optionalArgs.put("faction", "your");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));
|
||||||
|
|
||||||
this.setHelpShort("show faction balance");
|
this.setHelpShort("show faction balance");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,21 +16,14 @@ public class CmdFactionsMoneyDeposit extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsMoneyDeposit()
|
public CmdFactionsMoneyDeposit()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("d", "deposit");
|
this.addAliases("d", "deposit");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.addRequiredArg("amount");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("faction", "you");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));
|
||||||
|
|
||||||
this.setHelpShort("deposit money");
|
this.setHelpShort("deposit money");
|
||||||
|
|
||||||
senderMustBePlayer = true;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,20 +17,13 @@ public class CmdFactionsMoneyTransferFf extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("ff");
|
this.addAliases("ff");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.addRequiredArg("amount");
|
||||||
this.requiredArgs.add("faction");
|
this.addRequiredArg("faction");
|
||||||
this.requiredArgs.add("faction");
|
this.addRequiredArg("faction");
|
||||||
|
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));
|
||||||
|
|
||||||
this.setHelpShort("transfer f -> f");
|
this.setHelpShort("transfer f -> f");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,20 +17,13 @@ public class CmdFactionsMoneyTransferFp extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("fp");
|
this.addAliases("fp");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.addRequiredArg("amount");
|
||||||
this.requiredArgs.add("faction");
|
this.addRequiredArg("faction");
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
|
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));
|
||||||
|
|
||||||
this.setHelpShort("transfer f -> p");
|
this.setHelpShort("transfer f -> p");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,20 +17,13 @@ public class CmdFactionsMoneyTransferPf extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("pf");
|
this.addAliases("pf");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.addRequiredArg("amount");
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
this.requiredArgs.add("faction");
|
this.addRequiredArg("faction");
|
||||||
|
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));
|
||||||
|
|
||||||
this.setHelpShort("transfer p -> f");
|
this.setHelpShort("transfer p -> f");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,17 +17,12 @@ public class CmdFactionsMoneyWithdraw extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("w", "withdraw");
|
this.addAliases("w", "withdraw");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.addRequiredArg("amount");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("faction", "you");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));
|
||||||
|
|
||||||
this.setHelpShort("withdraw money");
|
this.setHelpShort("withdraw money");
|
||||||
|
|
||||||
senderMustBePlayer = true;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,12 +11,9 @@ public class CmdFactionsOfficer extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsOfficer()
|
public CmdFactionsOfficer()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("officer");
|
this.addAliases("officer");
|
||||||
|
|
||||||
this.requiredArgs.add("player name");
|
this.addRequiredArg("player");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.OFFICER.node));
|
this.addRequirements(ReqHasPerm.get(Perm.OFFICER.node));
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,9 @@ public class CmdFactionsOpen extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsOpen()
|
public CmdFactionsOpen()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("open");
|
this.addAliases("open");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("yes/no", "toggle");
|
||||||
this.optionalArgs.put("yes/no", "flip");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.OPEN.node));
|
this.addRequirements(ReqHasPerm.get(Perm.OPEN.node));
|
||||||
|
|
||||||
|
@ -9,21 +9,17 @@ import com.massivecraft.mcore.util.Txt;
|
|||||||
|
|
||||||
public class CmdFactionsPerm extends FCommand
|
public class CmdFactionsPerm extends FCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
public CmdFactionsPerm()
|
public CmdFactionsPerm()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("perm");
|
this.addAliases("perm");
|
||||||
|
|
||||||
this.optionalArgs.put("faction", "your");
|
this.addOptionalArg("faction", "your");
|
||||||
this.optionalArgs.put("perm", "all");
|
this.addOptionalArg("perm", "all");
|
||||||
this.optionalArgs.put("relation", "read");
|
this.addOptionalArg("relation", "read");
|
||||||
this.optionalArgs.put("yes/no", "read");
|
this.addOptionalArg("yes/no", "read");
|
||||||
|
this.setErrorOnToManyArgs(false);
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PERM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PERM.node));
|
||||||
|
|
||||||
this.errorOnToManyArgs = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,12 +10,9 @@ public class CmdFactionsPower extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsPower()
|
public CmdFactionsPower()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("power", "pow");
|
this.addAliases("power", "pow");
|
||||||
|
|
||||||
//this.requiredArgs.add("faction tag");
|
this.addOptionalArg("player", "you");
|
||||||
this.optionalArgs.put("player", "you");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.POWER.node));
|
this.addRequirements(ReqHasPerm.get(Perm.POWER.node));
|
||||||
}
|
}
|
||||||
|
@ -10,13 +10,11 @@ public class CmdFactionsPowerBoost extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsPowerBoost()
|
public CmdFactionsPowerBoost()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("powerboost");
|
this.addAliases("powerboost");
|
||||||
|
|
||||||
this.requiredArgs.add("p|f|player|faction");
|
this.addRequiredArg("p|f|player|faction");
|
||||||
this.requiredArgs.add("name");
|
this.addRequiredArg("name");
|
||||||
this.requiredArgs.add("#");
|
this.addRequiredArg("#");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,9 @@ public class CmdFactionsPromote extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsPromote()
|
public CmdFactionsPromote()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("promote");
|
this.addAliases("promote");
|
||||||
|
|
||||||
this.requiredArgs.add("player name");
|
this.addRequiredArg("player");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PROMOTE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PROMOTE.node));
|
||||||
|
|
||||||
|
@ -18,8 +18,6 @@ public abstract class CmdFactionsRelationAbstract extends FCommand
|
|||||||
|
|
||||||
public CmdFactionsRelationAbstract()
|
public CmdFactionsRelationAbstract()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("faction");
|
this.addAliases("faction");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));
|
||||||
|
@ -6,7 +6,8 @@ public class CmdFactionsRelationAlly extends CmdFactionsRelationAbstract
|
|||||||
{
|
{
|
||||||
public CmdFactionsRelationAlly()
|
public CmdFactionsRelationAlly()
|
||||||
{
|
{
|
||||||
aliases.add("ally");
|
this.addAliases("ally");
|
||||||
targetRelation = Rel.ALLY;
|
|
||||||
|
this.targetRelation = Rel.ALLY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,8 @@ public class CmdFactionsRelationEnemy extends CmdFactionsRelationAbstract
|
|||||||
{
|
{
|
||||||
public CmdFactionsRelationEnemy()
|
public CmdFactionsRelationEnemy()
|
||||||
{
|
{
|
||||||
aliases.add("enemy");
|
this.addAliases("enemy");
|
||||||
targetRelation = Rel.ENEMY;
|
|
||||||
|
this.targetRelation = Rel.ENEMY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,8 @@ public class CmdFactionsRelationNeutral extends CmdFactionsRelationAbstract
|
|||||||
{
|
{
|
||||||
public CmdFactionsRelationNeutral()
|
public CmdFactionsRelationNeutral()
|
||||||
{
|
{
|
||||||
aliases.add("neutral");
|
this.addAliases("neutral");
|
||||||
targetRelation = Rel.NEUTRAL;
|
|
||||||
|
this.targetRelation = Rel.NEUTRAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,8 @@ public class CmdFactionsRelationTruce extends CmdFactionsRelationAbstract
|
|||||||
{
|
{
|
||||||
public CmdFactionsRelationTruce()
|
public CmdFactionsRelationTruce()
|
||||||
{
|
{
|
||||||
aliases.add("truce");
|
this.addAliases("truce");
|
||||||
targetRelation = Rel.TRUCE;
|
|
||||||
|
this.targetRelation = Rel.TRUCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,12 +14,9 @@ public class CmdFactionsSeeChunk extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsSeeChunk()
|
public CmdFactionsSeeChunk()
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
|
|
||||||
this.addAliases("sc", "seechunk");
|
this.addAliases("sc", "seechunk");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.SEE_CHUNK.node));
|
this.addRequirements(ReqHasPerm.get(Perm.SEE_CHUNK.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,12 +15,10 @@ public class CmdFactionsSethome extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("sethome");
|
this.addAliases("sethome");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("faction", "you");
|
||||||
this.optionalArgs.put("faction", "your");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
|
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -22,8 +22,7 @@ public class CmdFactionsShow extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("show", "who");
|
this.addAliases("show", "who");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addOptionalArg("faction", "you");
|
||||||
this.optionalArgs.put("faction", "your");
|
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.SHOW.node));
|
this.addRequirements(ReqHasPerm.get(Perm.SHOW.node));
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ public class CmdFactionsTag extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("tag");
|
this.addAliases("tag");
|
||||||
|
|
||||||
this.requiredArgs.add("new tag");
|
this.addRequiredArg("new tag");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.TAG.node));
|
this.addRequirements(ReqHasPerm.get(Perm.TAG.node));
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ public class CmdFactionsTitle extends FCommand
|
|||||||
{
|
{
|
||||||
this.addAliases("title");
|
this.addAliases("title");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.addRequiredArg("player");
|
||||||
this.optionalArgs.put("title", "");
|
this.addOptionalArg("title", "");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ public class CmdFactionsUnclaim extends FCommand
|
|||||||
this.addAliases("unclaim", "declaim");
|
this.addAliases("unclaim", "declaim");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ public class CmdFactionsVersion extends FCommand
|
|||||||
public CmdFactionsVersion()
|
public CmdFactionsVersion()
|
||||||
{
|
{
|
||||||
this.addAliases("version");
|
this.addAliases("version");
|
||||||
|
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.VERSION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.VERSION.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user