2011-10-09 21:57:43 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
2011-10-09 20:10:19 +02:00
|
|
|
|
2011-10-16 11:02:29 +02:00
|
|
|
import java.util.Collections;
|
|
|
|
|
2011-10-09 20:10:19 +02:00
|
|
|
import com.massivecraft.factions.Conf;
|
|
|
|
|
|
|
|
public class FCmdRoot extends FCommand
|
|
|
|
{
|
2011-10-23 17:55:53 +02:00
|
|
|
public CmdLeader cmdLeader = new CmdLeader();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdAutoClaim cmdAutoClaim = new CmdAutoClaim();
|
2011-10-25 21:18:08 +02:00
|
|
|
public CmdAdmin cmdBypass = new CmdAdmin();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdChat cmdChat = new CmdChat();
|
2011-11-27 20:32:41 +01:00
|
|
|
public CmdChatSpy cmdChatSpy = new CmdChatSpy();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdClaim cmdClaim = new CmdClaim();
|
|
|
|
public CmdConfig cmdConfig = new CmdConfig();
|
|
|
|
public CmdCreate cmdCreate = new CmdCreate();
|
|
|
|
public CmdDeinvite cmdDeinvite = new CmdDeinvite();
|
|
|
|
public CmdDescription cmdDescription = new CmdDescription();
|
|
|
|
public CmdDisband cmdDisband = new CmdDisband();
|
2011-10-23 20:50:49 +02:00
|
|
|
public CmdFlag cmdFlag = new CmdFlag();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdHelp cmdHelp = new CmdHelp();
|
|
|
|
public CmdHome cmdHome = new CmdHome();
|
|
|
|
public CmdInvite cmdInvite = new CmdInvite();
|
|
|
|
public CmdJoin cmdJoin = new CmdJoin();
|
|
|
|
public CmdKick cmdKick = new CmdKick();
|
|
|
|
public CmdLeave cmdLeave = new CmdLeave();
|
|
|
|
public CmdList cmdList = new CmdList();
|
|
|
|
public CmdLock cmdLock = new CmdLock();
|
|
|
|
public CmdMap cmdMap = new CmdMap();
|
2011-10-23 17:55:53 +02:00
|
|
|
public CmdOfficer cmdOfficer = new CmdOfficer();
|
2011-10-13 14:41:07 +02:00
|
|
|
public CmdMoney cmdMoney = new CmdMoney();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdOpen cmdOpen = new CmdOpen();
|
2011-10-23 23:17:02 +02:00
|
|
|
public CmdPerm cmdPerm = new CmdPerm();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdPower cmdPower = new CmdPower();
|
|
|
|
public CmdRelationAlly cmdRelationAlly = new CmdRelationAlly();
|
|
|
|
public CmdRelationEnemy cmdRelationEnemy = new CmdRelationEnemy();
|
|
|
|
public CmdRelationNeutral cmdRelationNeutral = new CmdRelationNeutral();
|
2011-10-23 22:08:57 +02:00
|
|
|
public CmdRelationTruce cmdRelationTruce = new CmdRelationTruce();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdReload cmdReload = new CmdReload();
|
|
|
|
public CmdSaveAll cmdSaveAll = new CmdSaveAll();
|
2011-11-24 16:27:14 +01:00
|
|
|
public CmdSeeChunk cmdSeeChunks = new CmdSeeChunk();
|
2011-10-09 20:10:19 +02:00
|
|
|
public CmdSethome cmdSethome = new CmdSethome();
|
|
|
|
public CmdShow cmdShow = new CmdShow();
|
|
|
|
public CmdTag cmdTag = new CmdTag();
|
|
|
|
public CmdTitle cmdTitle = new CmdTitle();
|
|
|
|
public CmdUnclaim cmdUnclaim = new CmdUnclaim();
|
|
|
|
public CmdUnclaimall cmdUnclaimall = new CmdUnclaimall();
|
|
|
|
public CmdVersion cmdVersion = new CmdVersion();
|
|
|
|
|
|
|
|
public FCmdRoot()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
this.aliases.addAll(Conf.baseCommandAliases);
|
2011-10-16 11:02:29 +02:00
|
|
|
this.aliases.removeAll(Collections.singletonList(null)); // remove any nulls from extra commas
|
2011-10-09 20:10:19 +02:00
|
|
|
this.allowNoSlashAccess = Conf.allowNoSlashCommand;
|
|
|
|
|
2011-10-13 14:41:07 +02:00
|
|
|
//this.requiredArgs.add("");
|
|
|
|
//this.optionalArgs.put("","")
|
|
|
|
|
2011-10-09 20:10:19 +02:00
|
|
|
senderMustBePlayer = false;
|
|
|
|
senderMustBeMember = false;
|
2011-10-23 17:55:53 +02:00
|
|
|
senderMustBeOfficer = false;
|
|
|
|
senderMustBeLeader = false;
|
2011-10-09 20:10:19 +02:00
|
|
|
|
2011-10-09 21:57:43 +02:00
|
|
|
this.disableOnLock = false;
|
|
|
|
|
2011-10-09 20:10:19 +02:00
|
|
|
this.setHelpShort("The faction base command");
|
2011-10-10 13:31:25 +02:00
|
|
|
this.helpLong.add(p.txt.parseTags("<i>This command contains all faction stuff."));
|
2011-10-09 20:10:19 +02:00
|
|
|
|
|
|
|
//this.subCommands.add(p.cmdHelp);
|
|
|
|
|
2011-10-23 17:55:53 +02:00
|
|
|
this.addSubCommand(this.cmdLeader);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdAutoClaim);
|
|
|
|
this.addSubCommand(this.cmdBypass);
|
|
|
|
this.addSubCommand(this.cmdChat);
|
2011-11-27 20:32:41 +01:00
|
|
|
this.addSubCommand(this.cmdChatSpy);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdClaim);
|
|
|
|
this.addSubCommand(this.cmdConfig);
|
|
|
|
this.addSubCommand(this.cmdCreate);
|
|
|
|
this.addSubCommand(this.cmdDeinvite);
|
|
|
|
this.addSubCommand(this.cmdDescription);
|
|
|
|
this.addSubCommand(this.cmdDisband);
|
2011-10-23 20:50:49 +02:00
|
|
|
this.addSubCommand(this.cmdFlag);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdHelp);
|
|
|
|
this.addSubCommand(this.cmdHome);
|
|
|
|
this.addSubCommand(this.cmdInvite);
|
|
|
|
this.addSubCommand(this.cmdJoin);
|
|
|
|
this.addSubCommand(this.cmdKick);
|
|
|
|
this.addSubCommand(this.cmdLeave);
|
|
|
|
this.addSubCommand(this.cmdList);
|
|
|
|
this.addSubCommand(this.cmdLock);
|
|
|
|
this.addSubCommand(this.cmdMap);
|
2011-10-23 17:55:53 +02:00
|
|
|
this.addSubCommand(this.cmdOfficer);
|
2011-10-13 14:41:07 +02:00
|
|
|
this.addSubCommand(this.cmdMoney);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdOpen);
|
2011-10-23 23:17:02 +02:00
|
|
|
this.addSubCommand(this.cmdPerm);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdPower);
|
|
|
|
this.addSubCommand(this.cmdRelationAlly);
|
|
|
|
this.addSubCommand(this.cmdRelationEnemy);
|
|
|
|
this.addSubCommand(this.cmdRelationNeutral);
|
2011-10-23 22:08:57 +02:00
|
|
|
this.addSubCommand(this.cmdRelationTruce);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdReload);
|
|
|
|
this.addSubCommand(this.cmdSaveAll);
|
2011-11-24 16:27:14 +01:00
|
|
|
this.addSubCommand(this.cmdSeeChunks);
|
2011-10-10 01:21:05 +02:00
|
|
|
this.addSubCommand(this.cmdSethome);
|
|
|
|
this.addSubCommand(this.cmdShow);
|
|
|
|
this.addSubCommand(this.cmdTag);
|
|
|
|
this.addSubCommand(this.cmdTitle);
|
|
|
|
this.addSubCommand(this.cmdUnclaim);
|
|
|
|
this.addSubCommand(this.cmdUnclaimall);
|
|
|
|
this.addSubCommand(this.cmdVersion);
|
2011-10-09 20:10:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform()
|
|
|
|
{
|
|
|
|
this.commandChain.add(this);
|
|
|
|
this.cmdHelp.execute(this.sender, this.args, this.commandChain);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|