Factions/src/com/massivecraft/factions/cmd/CmdFactions.java

108 lines
5.3 KiB
Java
Raw Normal View History

2013-04-10 13:12:22 +02:00
package com.massivecraft.factions.cmd;
import java.util.Collections;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
2013-04-16 10:11:59 +02:00
import com.massivecraft.mcore.cmd.HelpCommand;
import com.massivecraft.mcore.cmd.VersionCommand;
2013-04-10 13:12:22 +02:00
public class CmdFactions extends FCommand
{
2013-06-18 09:34:46 +02:00
public CmdFactionsList cmdFactionsList = new CmdFactionsList();
public CmdFactionsFaction cmdFactionsFaction = new CmdFactionsFaction();
public CmdFactionsPlayer cmdFactionsPlayer = new CmdFactionsPlayer();
public CmdFactionsJoin cmdFactionsJoin = new CmdFactionsJoin();
public CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave();
public CmdFactionsHome cmdFactionsHome = new CmdFactionsHome();
public CmdFactionsMap cmdFactionsMap = new CmdFactionsMap();
2013-04-10 13:12:22 +02:00
public CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate();
2013-06-18 09:34:46 +02:00
public CmdFactionsName cmdFactionsName = new CmdFactionsName();
2013-04-10 13:12:22 +02:00
public CmdFactionsDescription cmdFactionsDescription = new CmdFactionsDescription();
2013-06-18 09:34:46 +02:00
public CmdFactionsSethome cmdFactionsSethome = new CmdFactionsSethome();
public CmdFactionsOpen cmdFactionsOpen = new CmdFactionsOpen();
2013-04-10 13:12:22 +02:00
public CmdFactionsInvite cmdFactionsInvite = new CmdFactionsInvite();
public CmdFactionsKick cmdFactionsKick = new CmdFactionsKick();
2013-06-18 09:34:46 +02:00
public CmdFactionsTitle cmdFactionsTitle = new CmdFactionsTitle();
public CmdFactionsPromote cmdFactionsPromote = new CmdFactionsPromote();
public CmdFactionsDemote cmdFactionsDemote = new CmdFactionsDemote();
2013-04-10 13:12:22 +02:00
public CmdFactionsOfficer cmdFactionsOfficer = new CmdFactionsOfficer();
2013-06-18 09:34:46 +02:00
public CmdFactionsLeader cmdFactionsLeader = new CmdFactionsLeader();
2013-06-18 10:24:20 +02:00
public CmdFactionsMoney cmdFactionsMoney = new CmdFactionsMoney();
2013-06-18 09:59:26 +02:00
public CmdFactionsSeeChunk cmdFactionsSeeChunk = new CmdFactionsSeeChunk();
2013-06-18 09:34:46 +02:00
public CmdFactionsClaim cmdFactionsClaim = new CmdFactionsClaim();
public CmdFactionsAutoClaim cmdFactionsAutoClaim = new CmdFactionsAutoClaim();
public CmdFactionsUnclaim cmdFactionsUnclaim = new CmdFactionsUnclaim();
public CmdFactionsUnclaimall cmdFactionsUnclaimall = new CmdFactionsUnclaimall();
public CmdFactionsAccess cmdFactionsAccess = new CmdFactionsAccess();
2013-04-10 13:12:22 +02:00
public CmdFactionsRelationAlly cmdFactionsRelationAlly = new CmdFactionsRelationAlly();
public CmdFactionsRelationTruce cmdFactionsRelationTruce = new CmdFactionsRelationTruce();
2013-06-18 09:34:46 +02:00
public CmdFactionsRelationNeutral cmdFactionsRelationNeutral = new CmdFactionsRelationNeutral();
public CmdFactionsRelationEnemy cmdFactionsRelationEnemy = new CmdFactionsRelationEnemy();
2013-06-18 10:13:31 +02:00
public CmdFactionsPerm cmdFactionsPerm = new CmdFactionsPerm();
public CmdFactionsFlag cmdFactionsFlag = new CmdFactionsFlag();
2013-06-18 09:34:46 +02:00
public CmdFactionsDisband cmdFactionsDisband = new CmdFactionsDisband();
public CmdFactionsAdmin cmdFactionsAdmin = new CmdFactionsAdmin();
public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost();
public VersionCommand cmdFactionsVersion = new VersionCommand(Factions.get(), Perm.VERSION.node, "v", "version");
2013-04-10 13:12:22 +02:00
public CmdFactions()
{
this.aliases.addAll(ConfServer.baseCommandAliases);
// remove any nulls from extra commas
// TODO: When is this required? Should this be added to MCore?
this.aliases.removeAll(Collections.singletonList(null));
this.setDesc("The faction base command");
this.setHelp("This command contains all faction stuff.");
2013-04-10 13:12:22 +02:00
2013-04-16 10:11:59 +02:00
this.addSubCommand(HelpCommand.get());
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsList);
this.addSubCommand(this.cmdFactionsFaction);
this.addSubCommand(this.cmdFactionsPlayer);
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsJoin);
this.addSubCommand(this.cmdFactionsLeave);
this.addSubCommand(this.cmdFactionsHome);
2013-06-18 09:34:46 +02:00
this.addSubCommand(this.cmdFactionsMap);
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsCreate);
this.addSubCommand(this.cmdFactionsName);
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsDescription);
2013-06-18 09:34:46 +02:00
this.addSubCommand(this.cmdFactionsSethome);
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsOpen);
2013-06-18 09:34:46 +02:00
this.addSubCommand(this.cmdFactionsInvite);
this.addSubCommand(this.cmdFactionsKick);
this.addSubCommand(this.cmdFactionsTitle);
this.addSubCommand(this.cmdFactionsPromote);
this.addSubCommand(this.cmdFactionsDemote);
this.addSubCommand(this.cmdFactionsOfficer);
this.addSubCommand(this.cmdFactionsLeader);
2013-06-18 10:24:20 +02:00
this.addSubCommand(this.cmdFactionsMoney);
2013-06-18 09:59:26 +02:00
this.addSubCommand(this.cmdFactionsSeeChunk);
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsClaim);
this.addSubCommand(this.cmdFactionsAutoClaim);
this.addSubCommand(this.cmdFactionsUnclaim);
this.addSubCommand(this.cmdFactionsUnclaimall);
this.addSubCommand(this.cmdFactionsAccess);
this.addSubCommand(this.cmdFactionsRelationAlly);
this.addSubCommand(this.cmdFactionsRelationTruce);
2013-06-18 09:34:46 +02:00
this.addSubCommand(this.cmdFactionsRelationNeutral);
this.addSubCommand(this.cmdFactionsRelationEnemy);
2013-06-18 10:13:31 +02:00
this.addSubCommand(this.cmdFactionsPerm);
this.addSubCommand(this.cmdFactionsFlag);
2013-06-18 09:34:46 +02:00
this.addSubCommand(this.cmdFactionsDisband);
2013-04-10 13:12:22 +02:00
this.addSubCommand(this.cmdFactionsAdmin);
this.addSubCommand(this.cmdFactionsPowerBoost);
this.addSubCommand(this.cmdFactionsVersion);
}
@Override
public void perform()
{
2013-04-16 10:11:59 +02:00
this.getCommandChain().add(this);
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain);
2013-04-10 13:12:22 +02:00
}
}