Rename command files

This commit is contained in:
Olof Larsson 2013-04-10 13:12:22 +02:00
parent 75c6257000
commit 01585801b9
58 changed files with 253 additions and 250 deletions

View File

@ -21,7 +21,7 @@ public class ConfServer extends SimpleConfig
// FIELDS // FIELDS
// -------------------------------------------- // // -------------------------------------------- //
public final static transient List<String> baseCommandAliases = MUtil.list("f"); public final static List<String> baseCommandAliases = MUtil.list("f");
// Colors // Colors
public static ChatColor colorMember = ChatColor.GREEN; public static ChatColor colorMember = ChatColor.GREEN;

View File

@ -162,7 +162,7 @@ public enum FPerm
fplayer.msg(errorpattern, hostFaction.describeTo(fplayer, true), this.getDescription()); fplayer.msg(errorpattern, hostFaction.describeTo(fplayer, true), this.getDescription());
if (Perm.ADMIN.has(fplayer.getPlayer())) if (Perm.ADMIN.has(fplayer.getPlayer()))
{ {
fplayer.msg("<i>You can bypass by using " + Factions.get().cmdBase.cmdBypass.getUseageTemplate(false)); fplayer.msg("<i>You can bypass by using " + Factions.get().cmdBase.cmdFactionsAdmin.getUseageTemplate(false));
} }
} }
return ret; return ret;

View File

@ -61,8 +61,8 @@ public class Factions extends MPlugin
private Integer econLandRewardTaskID = null; private Integer econLandRewardTaskID = null;
// Commands // Commands
public FCmdRoot cmdBase; public CmdFactions cmdBase;
public CmdAutoHelp cmdAutoHelp; public CmdFactionsAutoHelp cmdAutoHelp;
// -------------------------------------------- // // -------------------------------------------- //
// OVERRIDE // OVERRIDE
@ -84,8 +84,8 @@ public class Factions extends MPlugin
Board.load(); Board.load();
// Add Base Commands // Add Base Commands
this.cmdAutoHelp = new CmdAutoHelp(); this.cmdAutoHelp = new CmdFactionsAutoHelp();
this.cmdBase = new FCmdRoot(); this.cmdBase = new CmdFactions();
EssentialsFeatures.setup(); EssentialsFeatures.setup();
SpoutFeatures.setup(); SpoutFeatures.setup();

View File

@ -0,0 +1,126 @@
package com.massivecraft.factions.cmd;
import java.util.Collections;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions;
import com.massivecraft.mcore.util.Txt;
public class CmdFactions extends FCommand
{
public CmdFactionsAccess cmdFactionsAccess = new CmdFactionsAccess();
public CmdFactionsLeader cmdFactionsLeader = new CmdFactionsLeader();
public CmdFactionsAutoClaim cmdFactionsAutoClaim = new CmdFactionsAutoClaim();
public CmdFactionsAdmin cmdFactionsAdmin = new CmdFactionsAdmin();
public CmdFactionsCape cmdFactionsCape = new CmdFactionsCape();
public CmdFactionsClaim cmdFactionsClaim = new CmdFactionsClaim();
public CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate();
public CmdFactionsDeinvite cmdFactionsDeinvite = new CmdFactionsDeinvite();
public CmdFactionsDemote cmdFactionsDemote = new CmdFactionsDemote();
public CmdFactionsDescription cmdFactionsDescription = new CmdFactionsDescription();
public CmdFactionsDisband cmdFactionsDisband = new CmdFactionsDisband();
public CmdFactionsFlag cmdFactionsFlag = new CmdFactionsFlag();
public CmdFactionsHome cmdFactionsHome = new CmdFactionsHome();
public CmdFactionsInvite cmdFactionsInvite = new CmdFactionsInvite();
public CmdFactionsJoin cmdFactionsJoin = new CmdFactionsJoin();
public CmdFactionsKick cmdFactionsKick = new CmdFactionsKick();
public CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave();
public CmdFactionsList cmdFactionsList = new CmdFactionsList();
public CmdFactionsLock cmdFactionsLock = new CmdFactionsLock();
public CmdFactionsMap cmdFactionsMap = new CmdFactionsMap();
public CmdFactionsOfficer cmdFactionsOfficer = new CmdFactionsOfficer();
public CmdFactionsMoney cmdFactionsMoney = new CmdFactionsMoney();
public CmdFactionsOpen cmdFactionsOpen = new CmdFactionsOpen();
public CmdFactionsPerm cmdFactionsPerm = new CmdFactionsPerm();
public CmdFactionsPower cmdFactionsPower = new CmdFactionsPower();
public CmdFactionsPowerBoost cmdFactionsPowerBoost = new CmdFactionsPowerBoost();
public CmdFactionsPromote cmdFactionsPromote = new CmdFactionsPromote();
public CmdFactionsRelationAlly cmdFactionsRelationAlly = new CmdFactionsRelationAlly();
public CmdFactionsRelationEnemy cmdFactionsRelationEnemy = new CmdFactionsRelationEnemy();
public CmdFactionsRelationNeutral cmdFactionsRelationNeutral = new CmdFactionsRelationNeutral();
public CmdFactionsRelationTruce cmdFactionsRelationTruce = new CmdFactionsRelationTruce();
public CmdFactionsReload cmdFactionsReload = new CmdFactionsReload();
public CmdFactionsSaveAll cmdFactionsSaveAll = new CmdFactionsSaveAll();
public CmdFactionsSeeChunk cmdFactionsSeeChunk = new CmdFactionsSeeChunk();
public CmdFactionsSethome cmdFactionsSethome = new CmdFactionsSethome();
public CmdFactionsShow cmdFactionsShow = new CmdFactionsShow();
public CmdFactionsTag cmdFactionsTag = new CmdFactionsTag();
public CmdFactionsTitle cmdFactionsTitle = new CmdFactionsTitle();
public CmdFactionsUnclaim cmdFactionsUnclaim = new CmdFactionsUnclaim();
public CmdFactionsUnclaimall cmdFactionsUnclaimall = new CmdFactionsUnclaimall();
public CmdFactionsVersion cmdFactionsVersion = new CmdFactionsVersion();
public CmdFactions()
{
super();
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.requiredArgs.add("");
//this.optionalArgs.put("","")
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeOfficer = false;
senderMustBeLeader = false;
this.disableOnLock = false;
this.setHelpShort("The faction base command");
this.helpLong.add(Txt.parse("<i>This command contains all faction stuff."));
this.addSubCommand(Factions.get().cmdAutoHelp);
this.addSubCommand(this.cmdFactionsList);
this.addSubCommand(this.cmdFactionsShow);
this.addSubCommand(this.cmdFactionsPower);
this.addSubCommand(this.cmdFactionsJoin);
this.addSubCommand(this.cmdFactionsLeave);
this.addSubCommand(this.cmdFactionsHome);
this.addSubCommand(this.cmdFactionsCreate);
this.addSubCommand(this.cmdFactionsSethome);
this.addSubCommand(this.cmdFactionsTag);
this.addSubCommand(this.cmdFactionsDemote);
this.addSubCommand(this.cmdFactionsDescription);
this.addSubCommand(this.cmdFactionsCape);
this.addSubCommand(this.cmdFactionsPerm);
this.addSubCommand(this.cmdFactionsFlag);
this.addSubCommand(this.cmdFactionsInvite);
this.addSubCommand(this.cmdFactionsDeinvite);
this.addSubCommand(this.cmdFactionsOpen);
this.addSubCommand(this.cmdFactionsMoney);
this.addSubCommand(this.cmdFactionsClaim);
this.addSubCommand(this.cmdFactionsAutoClaim);
this.addSubCommand(this.cmdFactionsUnclaim);
this.addSubCommand(this.cmdFactionsUnclaimall);
this.addSubCommand(this.cmdFactionsAccess);
this.addSubCommand(this.cmdFactionsKick);
this.addSubCommand(this.cmdFactionsOfficer);
this.addSubCommand(this.cmdFactionsLeader);
this.addSubCommand(this.cmdFactionsTitle);
this.addSubCommand(this.cmdFactionsMap);
this.addSubCommand(this.cmdFactionsSeeChunk);
this.addSubCommand(this.cmdFactionsDisband);
this.addSubCommand(this.cmdFactionsRelationAlly);
this.addSubCommand(this.cmdFactionsRelationEnemy);
this.addSubCommand(this.cmdFactionsRelationNeutral);
this.addSubCommand(this.cmdFactionsRelationTruce);
this.addSubCommand(this.cmdFactionsAdmin);
this.addSubCommand(this.cmdFactionsPowerBoost);
this.addSubCommand(this.cmdFactionsPromote);
this.addSubCommand(this.cmdFactionsLock);
this.addSubCommand(this.cmdFactionsReload);
this.addSubCommand(this.cmdFactionsSaveAll);
this.addSubCommand(this.cmdFactionsVersion);
}
@Override
public void perform()
{
this.commandChain.add(this);
Factions.get().cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
}
}

View File

@ -11,9 +11,9 @@ import com.massivecraft.factions.integration.SpoutFeatures;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdAccess extends FCommand public class CmdFactionsAccess extends FCommand
{ {
public CmdAccess() public CmdFactionsAccess()
{ {
super(); super();
this.aliases.add("access"); this.aliases.add("access");

View File

@ -3,9 +3,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdAdmin extends FCommand public class CmdFactionsAdmin extends FCommand
{ {
public CmdAdmin() public CmdFactionsAdmin()
{ {
super(); super();
this.aliases.add("admin"); this.aliases.add("admin");

View File

@ -4,9 +4,9 @@ import com.massivecraft.factions.FPerm;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdAutoClaim extends FCommand public class CmdFactionsAutoClaim extends FCommand
{ {
public CmdAutoClaim() public CmdFactionsAutoClaim()
{ {
super(); super();
this.aliases.add("autoclaim"); this.aliases.add("autoclaim");

View File

@ -7,9 +7,9 @@ import com.massivecraft.factions.zcore.CommandVisibility;
import com.massivecraft.factions.zcore.MCommand; import com.massivecraft.factions.zcore.MCommand;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdAutoHelp extends MCommand<Factions> public class CmdFactionsAutoHelp extends MCommand<Factions>
{ {
public CmdAutoHelp() public CmdFactionsAutoHelp()
{ {
super(Factions.get()); super(Factions.get());
this.aliases.add("?"); this.aliases.add("?");

View File

@ -3,13 +3,13 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdCape extends FCommand public class CmdFactionsCape extends FCommand
{ {
public CmdCapeGet cmdCapeGet = new CmdCapeGet(); public CmdFactionsCapeGet cmdCapeGet = new CmdFactionsCapeGet();
public CmdCapeSet cmdCapeSet = new CmdCapeSet(); public CmdFactionsCapeSet cmdCapeSet = new CmdFactionsCapeSet();
public CmdCapeRemove cmdCapeRemove = new CmdCapeRemove(); public CmdFactionsCapeRemove cmdCapeRemove = new CmdFactionsCapeRemove();
public CmdCape() public CmdFactionsCape()
{ {
super(); super();
this.aliases.add("cape"); this.aliases.add("cape");

View File

@ -7,12 +7,12 @@ import org.bukkit.command.CommandSender;
import com.massivecraft.factions.FPerm; import com.massivecraft.factions.FPerm;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
public abstract class CmdCapeAbstract extends FCommand public abstract class CmdFactionsCapeAbstract extends FCommand
{ {
public Faction capeFaction; public Faction capeFaction;
public String currentCape; public String currentCape;
public CmdCapeAbstract() public CmdFactionsCapeAbstract()
{ {
this.optionalArgs.put("faction", "your"); this.optionalArgs.put("faction", "your");

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdCapeGet extends CmdCapeAbstract public class CmdFactionsCapeGet extends CmdFactionsCapeAbstract
{ {
public CmdCapeGet() public CmdFactionsCapeGet()
{ {
this.aliases.add("get"); this.aliases.add("get");
this.permission = Perm.CAPE_GET.node; this.permission = Perm.CAPE_GET.node;

View File

@ -4,10 +4,10 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
import com.massivecraft.factions.util.RelationUtil; import com.massivecraft.factions.util.RelationUtil;
public class CmdCapeRemove extends CmdCapeAbstract public class CmdFactionsCapeRemove extends CmdFactionsCapeAbstract
{ {
public CmdCapeRemove() public CmdFactionsCapeRemove()
{ {
this.aliases.add("rm"); this.aliases.add("rm");
this.aliases.add("rem"); this.aliases.add("rem");

View File

@ -6,10 +6,10 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
import com.massivecraft.factions.util.RelationUtil; import com.massivecraft.factions.util.RelationUtil;
public class CmdCapeSet extends CmdCapeAbstract public class CmdFactionsCapeSet extends CmdFactionsCapeAbstract
{ {
public CmdCapeSet() public CmdFactionsCapeSet()
{ {
this.aliases.add("set"); this.aliases.add("set");
this.requiredArgs.add("url"); this.requiredArgs.add("url");

View File

@ -7,10 +7,10 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.util.SpiralTask; import com.massivecraft.factions.util.SpiralTask;
public class CmdClaim extends FCommand public class CmdFactionsClaim extends FCommand
{ {
public CmdClaim() public CmdFactionsClaim()
{ {
super(); super();
this.aliases.add("claim"); this.aliases.add("claim");

View File

@ -15,9 +15,9 @@ import com.massivecraft.factions.Rel;
import com.massivecraft.factions.event.FPlayerJoinEvent; import com.massivecraft.factions.event.FPlayerJoinEvent;
import com.massivecraft.factions.event.FactionCreateEvent; import com.massivecraft.factions.event.FactionCreateEvent;
public class CmdCreate extends FCommand public class CmdFactionsCreate extends FCommand
{ {
public CmdCreate() public CmdFactionsCreate()
{ {
super(); super();
this.aliases.add("create"); this.aliases.add("create");
@ -95,7 +95,7 @@ public class CmdCreate extends FCommand
follower.msg("%s<i> created a new faction %s", fme.describeTo(follower, true), faction.getTag(follower)); follower.msg("%s<i> created a new faction %s", fme.describeTo(follower, true), faction.getTag(follower));
} }
msg("<i>You should now: %s", p.cmdBase.cmdDescription.getUseageTemplate()); msg("<i>You should now: %s", p.cmdBase.cmdFactionsDescription.getUseageTemplate());
if (ConfServer.logFactionCreate) if (ConfServer.logFactionCreate)
Factions.get().log(fme.getName()+" created a new faction: "+tag); Factions.get().log(fme.getName()+" created a new faction: "+tag);

View File

@ -3,10 +3,10 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdDeinvite extends FCommand public class CmdFactionsDeinvite extends FCommand
{ {
public CmdDeinvite() public CmdFactionsDeinvite()
{ {
super(); super();
this.aliases.add("deinvite"); this.aliases.add("deinvite");
@ -33,7 +33,7 @@ public class CmdDeinvite extends FCommand
if (you.getFaction() == myFaction) if (you.getFaction() == myFaction)
{ {
msg("%s<i> is already a member of %s", you.getName(), myFaction.getTag()); msg("%s<i> is already a member of %s", you.getName(), myFaction.getTag());
msg("<i>You might want to: %s", p.cmdBase.cmdKick.getUseageTemplate(false)); msg("<i>You might want to: %s", p.cmdBase.cmdFactionsKick.getUseageTemplate(false));
return; return;
} }

View File

@ -4,10 +4,10 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdDemote extends FCommand public class CmdFactionsDemote extends FCommand
{ {
public CmdDemote() public CmdFactionsDemote()
{ {
super(); super();
this.aliases.add("demote"); this.aliases.add("demote");

View File

@ -6,9 +6,9 @@ import com.massivecraft.factions.FPlayerColl;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdDescription extends FCommand public class CmdFactionsDescription extends FCommand
{ {
public CmdDescription() public CmdFactionsDescription()
{ {
super(); super();
this.aliases.add("desc"); this.aliases.add("desc");

View File

@ -15,9 +15,9 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
public class CmdDisband extends FCommand public class CmdFactionsDisband extends FCommand
{ {
public CmdDisband() public CmdFactionsDisband()
{ {
super(); super();
this.aliases.add("disband"); this.aliases.add("disband");

View File

@ -5,10 +5,10 @@ import com.massivecraft.factions.Faction;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdFlag extends FCommand public class CmdFactionsFlag extends FCommand
{ {
public CmdFlag() public CmdFactionsFlag()
{ {
super(); super();
this.aliases.add("flag"); this.aliases.add("flag");

View File

@ -20,10 +20,10 @@ import com.massivecraft.factions.integration.EssentialsFeatures;
import com.massivecraft.mcore.util.SmokeUtil; import com.massivecraft.mcore.util.SmokeUtil;
public class CmdHome extends FCommand public class CmdFactionsHome extends FCommand
{ {
public CmdHome() public CmdFactionsHome()
{ {
super(); super();
this.aliases.add("home"); this.aliases.add("home");
@ -59,7 +59,7 @@ public class CmdHome extends FCommand
if ( ! myFaction.hasHome()) if ( ! myFaction.hasHome())
{ {
fme.msg("<b>Your faction does not have a home. " + (fme.getRole().isLessThan(Rel.OFFICER) ? "<i> Ask your leader to:" : "<i>You should:")); fme.msg("<b>Your faction does not have a home. " + (fme.getRole().isLessThan(Rel.OFFICER) ? "<i> Ask your leader to:" : "<i>You should:"));
fme.sendMessage(p.cmdBase.cmdSethome.getUseageTemplate()); fme.sendMessage(p.cmdBase.cmdFactionsSethome.getUseageTemplate());
return; return;
} }

View File

@ -5,9 +5,9 @@ import com.massivecraft.factions.FPerm;
import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdInvite extends FCommand public class CmdFactionsInvite extends FCommand
{ {
public CmdInvite() public CmdFactionsInvite()
{ {
super(); super();
this.aliases.add("invite"); this.aliases.add("invite");
@ -34,7 +34,7 @@ public class CmdInvite extends FCommand
if (you.getFaction() == myFaction) if (you.getFaction() == myFaction)
{ {
msg("%s<i> is already a member of %s", you.getName(), myFaction.getTag()); msg("%s<i> is already a member of %s", you.getName(), myFaction.getTag());
msg("<i>You might want to: " + p.cmdBase.cmdKick.getUseageTemplate(false)); msg("<i>You might want to: " + p.cmdBase.cmdFactionsKick.getUseageTemplate(false));
return; return;
} }

View File

@ -10,9 +10,9 @@ import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.event.FPlayerJoinEvent; import com.massivecraft.factions.event.FPlayerJoinEvent;
public class CmdJoin extends FCommand public class CmdFactionsJoin extends FCommand
{ {
public CmdJoin() public CmdFactionsJoin()
{ {
super(); super();
this.aliases.add("join"); this.aliases.add("join");

View File

@ -11,10 +11,10 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
import com.massivecraft.factions.event.FPlayerLeaveEvent; import com.massivecraft.factions.event.FPlayerLeaveEvent;
public class CmdKick extends FCommand public class CmdFactionsKick extends FCommand
{ {
public CmdKick() public CmdFactionsKick()
{ {
super(); super();
this.aliases.add("kick"); this.aliases.add("kick");
@ -40,7 +40,7 @@ public class CmdKick extends FCommand
if (fme == you) if (fme == you)
{ {
msg("<b>You cannot kick yourself."); msg("<b>You cannot kick yourself.");
msg("<i>You might want to: %s", p.cmdBase.cmdLeave.getUseageTemplate(false)); msg("<i>You might want to: %s", p.cmdBase.cmdFactionsLeave.getUseageTemplate(false));
return; return;
} }

View File

@ -11,9 +11,9 @@ import com.massivecraft.factions.event.FPlayerJoinEvent;
import com.massivecraft.factions.util.RelationUtil; import com.massivecraft.factions.util.RelationUtil;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdLeader extends FCommand public class CmdFactionsLeader extends FCommand
{ {
public CmdLeader() public CmdFactionsLeader()
{ {
super(); super();
this.aliases.add("leader"); this.aliases.add("leader");

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdLeave extends FCommand { public class CmdFactionsLeave extends FCommand {
public CmdLeave() public CmdFactionsLeave()
{ {
super(); super();
this.aliases.add("leave"); this.aliases.add("leave");

View File

@ -11,10 +11,10 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdList extends FCommand public class CmdFactionsList extends FCommand
{ {
public CmdList() public CmdFactionsList()
{ {
super(); super();
this.aliases.add("list"); this.aliases.add("list");

View File

@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdLock extends FCommand { public class CmdFactionsLock extends FCommand {
// TODO: This solution needs refactoring. // TODO: This solution needs refactoring.
/* /*
@ -11,7 +11,7 @@ public class CmdLock extends FCommand {
default: op default: op
*/ */
public CmdLock() public CmdFactionsLock()
{ {
super(); super();
this.aliases.add("lock"); this.aliases.add("lock");

View File

@ -6,9 +6,9 @@ import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdMap extends FCommand public class CmdFactionsMap extends FCommand
{ {
public CmdMap() public CmdFactionsMap()
{ {
super(); super();
this.aliases.add("map"); this.aliases.add("map");

View File

@ -3,16 +3,16 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdMoney extends FCommand public class CmdFactionsMoney extends FCommand
{ {
public CmdMoneyBalance cmdMoneyBalance = new CmdMoneyBalance(); public CmdFactionsMoneyBalance cmdMoneyBalance = new CmdFactionsMoneyBalance();
public CmdMoneyDeposit cmdMoneyDeposit = new CmdMoneyDeposit(); public CmdFactionsMoneyDeposit cmdMoneyDeposit = new CmdFactionsMoneyDeposit();
public CmdMoneyWithdraw cmdMoneyWithdraw = new CmdMoneyWithdraw(); public CmdFactionsMoneyWithdraw cmdMoneyWithdraw = new CmdFactionsMoneyWithdraw();
public CmdMoneyTransferFf cmdMoneyTransferFf = new CmdMoneyTransferFf(); public CmdFactionsMoneyTransferFf cmdMoneyTransferFf = new CmdFactionsMoneyTransferFf();
public CmdMoneyTransferFp cmdMoneyTransferFp = new CmdMoneyTransferFp(); public CmdFactionsMoneyTransferFp cmdMoneyTransferFp = new CmdFactionsMoneyTransferFp();
public CmdMoneyTransferPf cmdMoneyTransferPf = new CmdMoneyTransferPf(); public CmdFactionsMoneyTransferPf cmdMoneyTransferPf = new CmdFactionsMoneyTransferPf();
public CmdMoney() public CmdFactionsMoney()
{ {
super(); super();
this.aliases.add("money"); this.aliases.add("money");

View File

@ -4,9 +4,9 @@ import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdMoneyBalance extends FCommand public class CmdFactionsMoneyBalance extends FCommand
{ {
public CmdMoneyBalance() public CmdFactionsMoneyBalance()
{ {
super(); super();
this.aliases.add("b"); this.aliases.add("b");

View File

@ -10,10 +10,10 @@ import com.massivecraft.mcore.util.Txt;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
public class CmdMoneyDeposit extends FCommand public class CmdFactionsMoneyDeposit extends FCommand
{ {
public CmdMoneyDeposit() public CmdFactionsMoneyDeposit()
{ {
super(); super();
this.aliases.add("d"); this.aliases.add("d");

View File

@ -10,9 +10,9 @@ import com.massivecraft.mcore.util.Txt;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
public class CmdMoneyTransferFf extends FCommand public class CmdFactionsMoneyTransferFf extends FCommand
{ {
public CmdMoneyTransferFf() public CmdFactionsMoneyTransferFf()
{ {
this.aliases.add("ff"); this.aliases.add("ff");

View File

@ -10,9 +10,9 @@ import com.massivecraft.mcore.util.Txt;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
public class CmdMoneyTransferFp extends FCommand public class CmdFactionsMoneyTransferFp extends FCommand
{ {
public CmdMoneyTransferFp() public CmdFactionsMoneyTransferFp()
{ {
this.aliases.add("fp"); this.aliases.add("fp");

View File

@ -10,9 +10,9 @@ import com.massivecraft.mcore.util.Txt;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
public class CmdMoneyTransferPf extends FCommand public class CmdFactionsMoneyTransferPf extends FCommand
{ {
public CmdMoneyTransferPf() public CmdFactionsMoneyTransferPf()
{ {
this.aliases.add("pf"); this.aliases.add("pf");

View File

@ -10,9 +10,9 @@ import com.massivecraft.mcore.util.Txt;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
public class CmdMoneyWithdraw extends FCommand public class CmdFactionsMoneyWithdraw extends FCommand
{ {
public CmdMoneyWithdraw() public CmdFactionsMoneyWithdraw()
{ {
this.aliases.add("w"); this.aliases.add("w");
this.aliases.add("withdraw"); this.aliases.add("withdraw");

View File

@ -5,10 +5,10 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdOfficer extends FCommand public class CmdFactionsOfficer extends FCommand
{ {
public CmdOfficer() public CmdFactionsOfficer()
{ {
super(); super();
this.aliases.add("officer"); this.aliases.add("officer");

View File

@ -5,9 +5,9 @@ import com.massivecraft.factions.Faction;
import com.massivecraft.factions.FactionColl; import com.massivecraft.factions.FactionColl;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdOpen extends FCommand public class CmdFactionsOpen extends FCommand
{ {
public CmdOpen() public CmdFactionsOpen()
{ {
super(); super();
this.aliases.add("open"); this.aliases.add("open");

View File

@ -6,10 +6,10 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdPerm extends FCommand public class CmdFactionsPerm extends FCommand
{ {
public CmdPerm() public CmdFactionsPerm()
{ {
super(); super();
this.aliases.add("perm"); this.aliases.add("perm");

View File

@ -4,10 +4,10 @@ import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdPower extends FCommand public class CmdFactionsPower extends FCommand
{ {
public CmdPower() public CmdFactionsPower()
{ {
super(); super();
this.aliases.add("power"); this.aliases.add("power");

View File

@ -5,9 +5,9 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdPowerBoost extends FCommand public class CmdFactionsPowerBoost extends FCommand
{ {
public CmdPowerBoost() public CmdFactionsPowerBoost()
{ {
super(); super();
this.aliases.add("powerboost"); this.aliases.add("powerboost");

View File

@ -4,10 +4,10 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdPromote extends FCommand public class CmdFactionsPromote extends FCommand
{ {
public CmdPromote() public CmdFactionsPromote()
{ {
super(); super();
this.aliases.add("promote"); this.aliases.add("promote");

View File

@ -10,11 +10,11 @@ import com.massivecraft.factions.Rel;
import com.massivecraft.factions.event.FactionRelationEvent; import com.massivecraft.factions.event.FactionRelationEvent;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
public abstract class FRelationCommand extends FCommand public abstract class CmdFactionsRelationAbstract extends FCommand
{ {
public Rel targetRelation; public Rel targetRelation;
public FRelationCommand() public CmdFactionsRelationAbstract()
{ {
super(); super();
this.requiredArgs.add("faction"); this.requiredArgs.add("faction");

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdRelationAlly extends FRelationCommand public class CmdFactionsRelationAlly extends CmdFactionsRelationAbstract
{ {
public CmdRelationAlly() public CmdFactionsRelationAlly()
{ {
aliases.add("ally"); aliases.add("ally");
targetRelation = Rel.ALLY; targetRelation = Rel.ALLY;

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdRelationEnemy extends FRelationCommand public class CmdFactionsRelationEnemy extends CmdFactionsRelationAbstract
{ {
public CmdRelationEnemy() public CmdFactionsRelationEnemy()
{ {
aliases.add("enemy"); aliases.add("enemy");
targetRelation = Rel.ENEMY; targetRelation = Rel.ENEMY;

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdRelationNeutral extends FRelationCommand public class CmdFactionsRelationNeutral extends CmdFactionsRelationAbstract
{ {
public CmdRelationNeutral() public CmdFactionsRelationNeutral()
{ {
aliases.add("neutral"); aliases.add("neutral");
targetRelation = Rel.NEUTRAL; targetRelation = Rel.NEUTRAL;

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
public class CmdRelationTruce extends FRelationCommand public class CmdFactionsRelationTruce extends CmdFactionsRelationAbstract
{ {
public CmdRelationTruce() public CmdFactionsRelationTruce()
{ {
aliases.add("truce"); aliases.add("truce");
targetRelation = Rel.TRUCE; targetRelation = Rel.TRUCE;

View File

@ -6,10 +6,10 @@ import com.massivecraft.factions.FactionColl;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdReload extends FCommand public class CmdFactionsReload extends FCommand
{ {
public CmdReload() public CmdFactionsReload()
{ {
super(); super();
this.aliases.add("reload"); this.aliases.add("reload");

View File

@ -5,10 +5,10 @@ import com.massivecraft.factions.FPlayerColl;
import com.massivecraft.factions.FactionColl; import com.massivecraft.factions.FactionColl;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdSaveAll extends FCommand public class CmdFactionsSaveAll extends FCommand
{ {
public CmdSaveAll() public CmdFactionsSaveAll()
{ {
super(); super();
this.aliases.add("saveall"); this.aliases.add("saveall");

View File

@ -8,9 +8,9 @@ import org.bukkit.entity.Player;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
import com.massivecraft.factions.util.VisualizeUtil; import com.massivecraft.factions.util.VisualizeUtil;
public class CmdSeeChunk extends FCommand public class CmdFactionsSeeChunk extends FCommand
{ {
public CmdSeeChunk() public CmdFactionsSeeChunk()
{ {
super(); super();
this.aliases.add("sc"); this.aliases.add("sc");

View File

@ -7,9 +7,9 @@ import com.massivecraft.factions.FPerm;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdSethome extends FCommand public class CmdFactionsSethome extends FCommand
{ {
public CmdSethome() public CmdFactionsSethome()
{ {
this.aliases.add("sethome"); this.aliases.add("sethome");
@ -60,7 +60,7 @@ public class CmdSethome extends FCommand
faction.setHome(me.getLocation()); faction.setHome(me.getLocation());
faction.msg("%s<i> set the home for your faction. You can now use:", fme.describeTo(myFaction, true)); faction.msg("%s<i> set the home for your faction. You can now use:", fme.describeTo(myFaction, true));
faction.sendMessage(p.cmdBase.cmdHome.getUseageTemplate()); faction.sendMessage(p.cmdBase.cmdFactionsHome.getUseageTemplate());
if (faction != myFaction) if (faction != myFaction)
{ {
fme.msg("<b>You have set the home for the "+faction.getTag(fme)+"<i> faction."); fme.msg("<b>You have set the home for the "+faction.getTag(fme)+"<i> faction.");

View File

@ -14,9 +14,9 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel; import com.massivecraft.factions.Rel;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdShow extends FCommand public class CmdFactionsShow extends FCommand
{ {
public CmdShow() public CmdFactionsShow()
{ {
this.aliases.add("show"); this.aliases.add("show");
this.aliases.add("who"); this.aliases.add("who");

View File

@ -12,10 +12,10 @@ import com.massivecraft.factions.event.FactionRenameEvent;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
import com.massivecraft.factions.util.MiscUtil; import com.massivecraft.factions.util.MiscUtil;
public class CmdTag extends FCommand public class CmdFactionsTag extends FCommand
{ {
public CmdTag() public CmdFactionsTag()
{ {
this.aliases.add("tag"); this.aliases.add("tag");

View File

@ -6,9 +6,9 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class CmdTitle extends FCommand public class CmdFactionsTitle extends FCommand
{ {
public CmdTitle() public CmdFactionsTitle()
{ {
this.aliases.add("title"); this.aliases.add("title");

View File

@ -13,9 +13,9 @@ import com.massivecraft.factions.Faction;
import com.massivecraft.factions.Factions; import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdUnclaim extends FCommand public class CmdFactionsUnclaim extends FCommand
{ {
public CmdUnclaim() public CmdFactionsUnclaim()
{ {
this.aliases.add("unclaim"); this.aliases.add("unclaim");
this.aliases.add("declaim"); this.aliases.add("declaim");

View File

@ -10,9 +10,9 @@ import com.massivecraft.factions.event.LandUnclaimAllEvent;
import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.integration.SpoutFeatures; import com.massivecraft.factions.integration.SpoutFeatures;
public class CmdUnclaimall extends FCommand public class CmdFactionsUnclaimall extends FCommand
{ {
public CmdUnclaimall() public CmdFactionsUnclaimall()
{ {
this.aliases.add("unclaimall"); this.aliases.add("unclaimall");
this.aliases.add("declaimall"); this.aliases.add("declaimall");

View File

@ -4,9 +4,9 @@ import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm; import com.massivecraft.factions.Perm;
public class CmdVersion extends FCommand public class CmdFactionsVersion extends FCommand
{ {
public CmdVersion() public CmdFactionsVersion()
{ {
this.aliases.add("version"); this.aliases.add("version");

View File

@ -1,123 +0,0 @@
package com.massivecraft.factions.cmd;
import java.util.Collections;
import com.massivecraft.factions.ConfServer;
import com.massivecraft.factions.Factions;
import com.massivecraft.mcore.util.Txt;
public class FCmdRoot extends FCommand
{
public CmdAccess cmdAccess = new CmdAccess();
public CmdLeader cmdLeader = new CmdLeader();
public CmdAutoClaim cmdAutoClaim = new CmdAutoClaim();
public CmdAdmin cmdBypass = new CmdAdmin();
public CmdCape cmdCape = new CmdCape();
public CmdClaim cmdClaim = new CmdClaim();
public CmdCreate cmdCreate = new CmdCreate();
public CmdDeinvite cmdDeinvite = new CmdDeinvite();
public CmdDemote cmdDemote = new CmdDemote();
public CmdDescription cmdDescription = new CmdDescription();
public CmdDisband cmdDisband = new CmdDisband();
public CmdFlag cmdFlag = new CmdFlag();
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();
public CmdOfficer cmdOfficer = new CmdOfficer();
public CmdMoney cmdMoney = new CmdMoney();
public CmdOpen cmdOpen = new CmdOpen();
public CmdPerm cmdPerm = new CmdPerm();
public CmdPower cmdPower = new CmdPower();
public CmdPowerBoost cmdPowerBoost = new CmdPowerBoost();
public CmdPromote cmdPromote = new CmdPromote();
public CmdRelationAlly cmdRelationAlly = new CmdRelationAlly();
public CmdRelationEnemy cmdRelationEnemy = new CmdRelationEnemy();
public CmdRelationNeutral cmdRelationNeutral = new CmdRelationNeutral();
public CmdRelationTruce cmdRelationTruce = new CmdRelationTruce();
public CmdReload cmdReload = new CmdReload();
public CmdSaveAll cmdSaveAll = new CmdSaveAll();
public CmdSeeChunk cmdSeeChunks = new CmdSeeChunk();
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(ConfServer.baseCommandAliases);
this.aliases.removeAll(Collections.singletonList(null)); // remove any nulls from extra commas
//this.requiredArgs.add("");
//this.optionalArgs.put("","")
senderMustBePlayer = false;
senderMustBeMember = false;
senderMustBeOfficer = false;
senderMustBeLeader = false;
this.disableOnLock = false;
this.setHelpShort("The faction base command");
this.helpLong.add(Txt.parse("<i>This command contains all faction stuff."));
this.addSubCommand(Factions.get().cmdAutoHelp);
this.addSubCommand(this.cmdList);
this.addSubCommand(this.cmdShow);
this.addSubCommand(this.cmdPower);
this.addSubCommand(this.cmdJoin);
this.addSubCommand(this.cmdLeave);
this.addSubCommand(this.cmdHome);
this.addSubCommand(this.cmdCreate);
this.addSubCommand(this.cmdSethome);
this.addSubCommand(this.cmdTag);
this.addSubCommand(this.cmdDemote);
this.addSubCommand(this.cmdDescription);
this.addSubCommand(this.cmdCape);
this.addSubCommand(this.cmdPerm);
this.addSubCommand(this.cmdFlag);
this.addSubCommand(this.cmdInvite);
this.addSubCommand(this.cmdDeinvite);
this.addSubCommand(this.cmdOpen);
this.addSubCommand(this.cmdMoney);
this.addSubCommand(this.cmdClaim);
this.addSubCommand(this.cmdAutoClaim);
this.addSubCommand(this.cmdUnclaim);
this.addSubCommand(this.cmdUnclaimall);
this.addSubCommand(this.cmdAccess);
this.addSubCommand(this.cmdKick);
this.addSubCommand(this.cmdOfficer);
this.addSubCommand(this.cmdLeader);
this.addSubCommand(this.cmdTitle);
this.addSubCommand(this.cmdMap);
this.addSubCommand(this.cmdSeeChunks);
this.addSubCommand(this.cmdDisband);
this.addSubCommand(this.cmdRelationAlly);
this.addSubCommand(this.cmdRelationEnemy);
this.addSubCommand(this.cmdRelationNeutral);
this.addSubCommand(this.cmdRelationTruce);
this.addSubCommand(this.cmdBypass);
this.addSubCommand(this.cmdPowerBoost);
this.addSubCommand(this.cmdPromote);
this.addSubCommand(this.cmdLock);
this.addSubCommand(this.cmdReload);
this.addSubCommand(this.cmdSaveAll);
this.addSubCommand(this.cmdVersion);
}
@Override
public void perform()
{
this.commandChain.add(this);
Factions.get().cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
}
}