mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-27 12:46:09 +01:00
Fixing adding aliases to commands.
This commit is contained in:
parent
3d9847e4a6
commit
4c0adc523a
@ -4,6 +4,7 @@ import java.util.Collections;
|
|||||||
|
|
||||||
import com.massivecraft.factions.ConfServer;
|
import com.massivecraft.factions.ConfServer;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
|
import com.massivecraft.mcore.cmd.HelpCommand;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactions extends FCommand
|
public class CmdFactions extends FCommand
|
||||||
@ -56,15 +57,10 @@ public class CmdFactions extends FCommand
|
|||||||
// TODO: When is this required? Should this be added to MCore?
|
// TODO: When is this required? Should this be added to MCore?
|
||||||
this.aliases.removeAll(Collections.singletonList(null));
|
this.aliases.removeAll(Collections.singletonList(null));
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
|
||||||
senderMustBeMember = false;
|
|
||||||
senderMustBeOfficer = false;
|
|
||||||
senderMustBeLeader = false;
|
|
||||||
|
|
||||||
this.setHelpShort("The faction base command");
|
this.setHelpShort("The faction base command");
|
||||||
this.helpLong.add(Txt.parse("<i>This command contains all faction stuff."));
|
this.helpLong.add(Txt.parse("<i>This command contains all faction stuff."));
|
||||||
|
|
||||||
this.addSubCommand(Factions.get().cmdAutoHelp);
|
this.addSubCommand(HelpCommand.get());
|
||||||
this.addSubCommand(this.cmdFactionsList);
|
this.addSubCommand(this.cmdFactionsList);
|
||||||
this.addSubCommand(this.cmdFactionsShow);
|
this.addSubCommand(this.cmdFactionsShow);
|
||||||
this.addSubCommand(this.cmdFactionsPower);
|
this.addSubCommand(this.cmdFactionsPower);
|
||||||
@ -108,8 +104,8 @@ public class CmdFactions extends FCommand
|
|||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform()
|
||||||
{
|
{
|
||||||
this.commandChain.add(this);
|
this.getCommandChain().add(this);
|
||||||
Factions.get().cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
|
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,10 @@ public class CmdFactionsAccess extends FCommand
|
|||||||
public CmdFactionsAccess()
|
public CmdFactionsAccess()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("access");
|
|
||||||
|
|
||||||
this.optionalArgs.put("view|p|f|player|faction", "view");
|
this.addAliases("access");
|
||||||
|
|
||||||
|
this.optionalArgs.put("view|p|player|f|faction", "view");
|
||||||
this.optionalArgs.put("name", "you");
|
this.optionalArgs.put("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");
|
||||||
@ -30,7 +31,7 @@ public class CmdFactionsAccess extends FCommand
|
|||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform()
|
||||||
{
|
{
|
||||||
String type = this.argAsString(0);
|
String type = this.arg(0);
|
||||||
type = (type == null) ? "" : type.toLowerCase();
|
type = (type == null) ? "" : type.toLowerCase();
|
||||||
PS chunk = PS.valueOf(me).getChunk(true);
|
PS chunk = PS.valueOf(me).getChunk(true);
|
||||||
|
|
||||||
|
@ -2,18 +2,19 @@ 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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsAdmin extends FCommand
|
public class CmdFactionsAdmin extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsAdmin()
|
public CmdFactionsAdmin()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("admin");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addAliases("admin");
|
||||||
|
|
||||||
this.optionalArgs.put("on/off", "flip");
|
this.optionalArgs.put("on/off", "flip");
|
||||||
|
|
||||||
this.permission = Perm.ADMIN.node;
|
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
|||||||
import com.massivecraft.factions.FPerm;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
|
|
||||||
public class CmdFactionsAutoClaim extends FCommand
|
public class CmdFactionsAutoClaim extends FCommand
|
||||||
@ -10,13 +11,12 @@ public class CmdFactionsAutoClaim extends FCommand
|
|||||||
public CmdFactionsAutoClaim()
|
public CmdFactionsAutoClaim()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("autoclaim");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addAliases("autoclaim");
|
||||||
|
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.AUTOCLAIM.node;
|
this.addRequirements(ReqHasPerm.get(Perm.AUTOCLAIM.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
|
import com.massivecraft.mcore.cmd.HelpCommand;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsCape extends FCommand
|
public class CmdFactionsCape extends FCommand
|
||||||
{
|
{
|
||||||
@ -12,9 +13,10 @@ public class CmdFactionsCape extends FCommand
|
|||||||
public CmdFactionsCape()
|
public CmdFactionsCape()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("cape");
|
|
||||||
|
|
||||||
this.permission = Perm.CAPE.node;
|
this.addAliases("cape");
|
||||||
|
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE.node));
|
||||||
|
|
||||||
this.addSubCommand(this.cmdCapeGet);
|
this.addSubCommand(this.cmdCapeGet);
|
||||||
this.addSubCommand(this.cmdCapeSet);
|
this.addSubCommand(this.cmdCapeSet);
|
||||||
@ -24,8 +26,8 @@ public class CmdFactionsCape extends FCommand
|
|||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform()
|
||||||
{
|
{
|
||||||
this.commandChain.add(this);
|
this.getCommandChain().add(this);
|
||||||
Factions.get().cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
|
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsCapeGet extends CmdFactionsCapeAbstract
|
public class CmdFactionsCapeGet extends CmdFactionsCapeAbstract
|
||||||
{
|
{
|
||||||
public CmdFactionsCapeGet()
|
public CmdFactionsCapeGet()
|
||||||
{
|
{
|
||||||
this.aliases.add("get");
|
this.addAliases("get");
|
||||||
this.permission = Perm.CAPE_GET.node;
|
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE_GET.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,18 +3,14 @@ package com.massivecraft.factions.cmd;
|
|||||||
import com.massivecraft.factions.Perm;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsCapeRemove extends CmdFactionsCapeAbstract
|
public class CmdFactionsCapeRemove extends CmdFactionsCapeAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
public CmdFactionsCapeRemove()
|
public CmdFactionsCapeRemove()
|
||||||
{
|
{
|
||||||
this.aliases.add("rm");
|
this.addAliases("rm", "rem", "remove", "del", "delete");
|
||||||
this.aliases.add("rem");
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE_REMOVE.node));
|
||||||
this.aliases.add("remove");
|
|
||||||
this.aliases.add("del");
|
|
||||||
this.aliases.add("delete");
|
|
||||||
this.permission = Perm.CAPE_REMOVE.node;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -5,15 +5,18 @@ import java.net.URL;
|
|||||||
import com.massivecraft.factions.Perm;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsCapeSet extends CmdFactionsCapeAbstract
|
public class CmdFactionsCapeSet extends CmdFactionsCapeAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
public CmdFactionsCapeSet()
|
public CmdFactionsCapeSet()
|
||||||
{
|
{
|
||||||
this.aliases.add("set");
|
this.addAliases("set");
|
||||||
|
|
||||||
this.requiredArgs.add("url");
|
this.requiredArgs.add("url");
|
||||||
this.permission = Perm.CAPE_SET.node;
|
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.CAPE_SET.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -4,6 +4,7 @@ import com.massivecraft.factions.ConfServer;
|
|||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.util.SpiralTask;
|
import com.massivecraft.factions.util.SpiralTask;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
import com.massivecraft.mcore.ps.PS;
|
import com.massivecraft.mcore.ps.PS;
|
||||||
|
|
||||||
@ -14,13 +15,14 @@ public class CmdFactionsClaim extends FCommand
|
|||||||
public CmdFactionsClaim()
|
public CmdFactionsClaim()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("claim");
|
|
||||||
|
this.addAliases("claim");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
this.optionalArgs.put("radius", "1");
|
this.optionalArgs.put("radius", "1");
|
||||||
|
|
||||||
this.permission = Perm.CLAIM.node;
|
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.Rel;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
|
|
||||||
public class CmdFactionsCreate extends FCommand
|
public class CmdFactionsCreate extends FCommand
|
||||||
@ -21,12 +22,13 @@ public class CmdFactionsCreate extends FCommand
|
|||||||
public CmdFactionsCreate()
|
public CmdFactionsCreate()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("create");
|
|
||||||
|
this.addAliases("create");
|
||||||
|
|
||||||
this.requiredArgs.add("faction tag");
|
this.requiredArgs.add("faction tag");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.CREATE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.CREATE.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,6 +2,7 @@ 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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsDeinvite extends FCommand
|
public class CmdFactionsDeinvite extends FCommand
|
||||||
{
|
{
|
||||||
@ -9,13 +10,13 @@ public class CmdFactionsDeinvite extends FCommand
|
|||||||
public CmdFactionsDeinvite()
|
public CmdFactionsDeinvite()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("deinvite");
|
|
||||||
this.aliases.add("deinv");
|
this.addAliases("deinvite", "deinv");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.requiredArgs.add("player");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.DEINVITE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.DEINVITE.node));
|
||||||
|
|
||||||
senderMustBeMember = false;
|
senderMustBeMember = false;
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
|
@ -3,6 +3,7 @@ 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;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsDemote extends FCommand
|
public class CmdFactionsDemote extends FCommand
|
||||||
{
|
{
|
||||||
@ -10,12 +11,13 @@ public class CmdFactionsDemote extends FCommand
|
|||||||
public CmdFactionsDemote()
|
public CmdFactionsDemote()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("demote");
|
|
||||||
|
this.addAliases("demote");
|
||||||
|
|
||||||
this.requiredArgs.add("player name");
|
this.requiredArgs.add("player name");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.DEMOTE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.DEMOTE.node));
|
||||||
|
|
||||||
//To demote someone from member -> recruit you must be an officer.
|
//To demote someone from member -> recruit you must be an officer.
|
||||||
//To demote someone from officer -> member you must be a leader.
|
//To demote someone from officer -> member you must be a leader.
|
||||||
|
@ -4,6 +4,7 @@ import com.massivecraft.factions.ConfServer;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
import com.massivecraft.factions.FPlayer;
|
||||||
import com.massivecraft.factions.FPlayerColl;
|
import com.massivecraft.factions.FPlayerColl;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsDescription extends FCommand
|
public class CmdFactionsDescription extends FCommand
|
||||||
@ -11,13 +12,14 @@ public class CmdFactionsDescription extends FCommand
|
|||||||
public CmdFactionsDescription()
|
public CmdFactionsDescription()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("desc");
|
|
||||||
|
this.addAliases("desc");
|
||||||
|
|
||||||
this.requiredArgs.add("desc");
|
this.requiredArgs.add("desc");
|
||||||
this.errorOnToManyArgs = false;
|
this.errorOnToManyArgs = false;
|
||||||
//this.optionalArgs
|
//this.optionalArgs
|
||||||
|
|
||||||
this.permission = Perm.DESCRIPTION.node;
|
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
}
|
}
|
||||||
|
@ -14,18 +14,20 @@ import com.massivecraft.factions.Factions;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsDisband extends FCommand
|
public class CmdFactionsDisband extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsDisband()
|
public CmdFactionsDisband()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("disband");
|
|
||||||
|
this.addAliases("disband");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.DISBAND.node;
|
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
|||||||
import com.massivecraft.factions.FFlag;
|
import com.massivecraft.factions.FFlag;
|
||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsFlag extends FCommand
|
public class CmdFactionsFlag extends FCommand
|
||||||
@ -11,14 +12,15 @@ public class CmdFactionsFlag extends FCommand
|
|||||||
public CmdFactionsFlag()
|
public CmdFactionsFlag()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("flag");
|
|
||||||
|
this.addAliases("flag");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
this.optionalArgs.put("flag", "all");
|
this.optionalArgs.put("flag", "all");
|
||||||
this.optionalArgs.put("yes/no", "read");
|
this.optionalArgs.put("yes/no", "read");
|
||||||
|
|
||||||
this.permission = Perm.FLAG.node;
|
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,6 +16,7 @@ import com.massivecraft.factions.Faction;
|
|||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.integration.EssentialsFeatures;
|
import com.massivecraft.factions.integration.EssentialsFeatures;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
import com.massivecraft.mcore.ps.PS;
|
import com.massivecraft.mcore.ps.PS;
|
||||||
import com.massivecraft.mcore.util.SmokeUtil;
|
import com.massivecraft.mcore.util.SmokeUtil;
|
||||||
@ -27,12 +28,13 @@ public class CmdFactionsHome extends FCommand
|
|||||||
public CmdFactionsHome()
|
public CmdFactionsHome()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("home");
|
|
||||||
|
this.addAliases("home");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.HOME.node;
|
this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.massivecraft.factions.ConfServer;
|
|||||||
import com.massivecraft.factions.FPerm;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
|
|
||||||
public class CmdFactionsInvite extends FCommand
|
public class CmdFactionsInvite extends FCommand
|
||||||
@ -11,15 +12,13 @@ public class CmdFactionsInvite extends FCommand
|
|||||||
public CmdFactionsInvite()
|
public CmdFactionsInvite()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("invite");
|
|
||||||
this.aliases.add("inv");
|
this.addAliases("inv", "invite");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.requiredArgs.add("player");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.INVITE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.INVITE.node));
|
||||||
|
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
|
@ -9,18 +9,20 @@ 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;
|
||||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsJoin extends FCommand
|
public class CmdFactionsJoin extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsJoin()
|
public CmdFactionsJoin()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("join");
|
|
||||||
|
this.addAliases("join");
|
||||||
|
|
||||||
this.requiredArgs.add("faction");
|
this.requiredArgs.add("faction");
|
||||||
this.optionalArgs.put("player", "you");
|
this.optionalArgs.put("player", "you");
|
||||||
|
|
||||||
this.permission = Perm.JOIN.node;
|
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,6 +10,7 @@ import com.massivecraft.factions.Factions;
|
|||||||
import com.massivecraft.factions.Perm;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsKick extends FCommand
|
public class CmdFactionsKick extends FCommand
|
||||||
{
|
{
|
||||||
@ -17,12 +18,13 @@ public class CmdFactionsKick extends FCommand
|
|||||||
public CmdFactionsKick()
|
public CmdFactionsKick()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("kick");
|
|
||||||
|
this.addAliases("kick");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.requiredArgs.add("player");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.KICK.node;
|
this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,6 +9,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||||
import com.massivecraft.factions.util.RelationUtil;
|
import com.massivecraft.factions.util.RelationUtil;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsLeader extends FCommand
|
public class CmdFactionsLeader extends FCommand
|
||||||
@ -16,12 +17,13 @@ public class CmdFactionsLeader extends FCommand
|
|||||||
public CmdFactionsLeader()
|
public CmdFactionsLeader()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("leader");
|
|
||||||
|
this.addAliases("leader");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.requiredArgs.add("player");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.LEADER.node;
|
this.addRequirements(ReqHasPerm.get(Perm.LEADER.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsLeave extends FCommand {
|
public class CmdFactionsLeave extends FCommand {
|
||||||
|
|
||||||
public CmdFactionsLeave()
|
public CmdFactionsLeave()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("leave");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addAliases("leave");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.permission = Perm.LEAVE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.LEAVE.node));
|
||||||
|
|
||||||
senderMustBeMember = true;
|
senderMustBeMember = true;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.massivecraft.factions.ConfServer;
|
|||||||
import com.massivecraft.factions.Faction;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
|
|
||||||
@ -17,13 +18,13 @@ public class CmdFactionsList extends FCommand
|
|||||||
public CmdFactionsList()
|
public CmdFactionsList()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("list");
|
|
||||||
this.aliases.add("ls");
|
this.addAliases("ls", "list");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("page", "1");
|
this.optionalArgs.put("page", "1");
|
||||||
|
|
||||||
this.permission = Perm.LIST.node;
|
this.addRequirements(ReqHasPerm.get(Perm.LIST.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
|||||||
import com.massivecraft.factions.BoardColl;
|
import com.massivecraft.factions.BoardColl;
|
||||||
import com.massivecraft.factions.ConfServer;
|
import com.massivecraft.factions.ConfServer;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
import com.massivecraft.mcore.ps.PS;
|
import com.massivecraft.mcore.ps.PS;
|
||||||
|
|
||||||
@ -12,12 +13,12 @@ public class CmdFactionsMap extends FCommand
|
|||||||
public CmdFactionsMap()
|
public CmdFactionsMap()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("map");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addAliases("map");
|
||||||
|
|
||||||
this.optionalArgs.put("on/off", "once");
|
this.optionalArgs.put("on/off", "once");
|
||||||
|
|
||||||
this.permission = Perm.MAP.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MAP.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
|
import com.massivecraft.mcore.cmd.HelpCommand;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsMoney extends FCommand
|
public class CmdFactionsMoney extends FCommand
|
||||||
@ -15,10 +16,8 @@ public class CmdFactionsMoney extends FCommand
|
|||||||
public CmdFactionsMoney()
|
public CmdFactionsMoney()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("money");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addAliases("money");
|
||||||
//this.optionalArgs.put("","")
|
|
||||||
|
|
||||||
this.isMoneyCommand = true;
|
this.isMoneyCommand = true;
|
||||||
|
|
||||||
@ -41,8 +40,8 @@ public class CmdFactionsMoney extends FCommand
|
|||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform()
|
||||||
{
|
{
|
||||||
this.commandChain.add(this);
|
this.getCommandChain().add(this);
|
||||||
Factions.get().cmdAutoHelp.execute(this.sender, this.args, this.commandChain);
|
HelpCommand.getInstance().execute(this.sender, this.args, this.commandChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,21 @@ package com.massivecraft.factions.cmd;
|
|||||||
import com.massivecraft.factions.integration.Econ;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsMoneyBalance extends FCommand
|
public class CmdFactionsMoneyBalance extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsMoneyBalance()
|
public CmdFactionsMoneyBalance()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("b");
|
|
||||||
this.aliases.add("balance");
|
this.addAliases("b", "balance");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.MONEY_BALANCE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));
|
||||||
|
|
||||||
this.setHelpShort("show faction balance");
|
this.setHelpShort("show faction balance");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
senderMustBePlayer = false;
|
||||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Factions;
|
|||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -16,13 +17,14 @@ public class CmdFactionsMoneyDeposit extends FCommand
|
|||||||
public CmdFactionsMoneyDeposit()
|
public CmdFactionsMoneyDeposit()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("d");
|
|
||||||
this.aliases.add("deposit");
|
this.addAliases("d", "deposit");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.requiredArgs.add("amount");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.MONEY_DEPOSIT.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));
|
||||||
|
|
||||||
this.setHelpShort("deposit money");
|
this.setHelpShort("deposit money");
|
||||||
|
|
||||||
senderMustBePlayer = true;
|
senderMustBePlayer = true;
|
||||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -14,7 +15,7 @@ public class CmdFactionsMoneyTransferFf extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsMoneyTransferFf()
|
public CmdFactionsMoneyTransferFf()
|
||||||
{
|
{
|
||||||
this.aliases.add("ff");
|
this.addAliases("ff");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.requiredArgs.add("amount");
|
||||||
this.requiredArgs.add("faction");
|
this.requiredArgs.add("faction");
|
||||||
@ -22,7 +23,8 @@ public class CmdFactionsMoneyTransferFf extends FCommand
|
|||||||
|
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.MONEY_F2F.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));
|
||||||
|
|
||||||
this.setHelpShort("transfer f -> f");
|
this.setHelpShort("transfer f -> f");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
senderMustBePlayer = false;
|
||||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -14,7 +15,7 @@ public class CmdFactionsMoneyTransferFp extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsMoneyTransferFp()
|
public CmdFactionsMoneyTransferFp()
|
||||||
{
|
{
|
||||||
this.aliases.add("fp");
|
this.addAliases("fp");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.requiredArgs.add("amount");
|
||||||
this.requiredArgs.add("faction");
|
this.requiredArgs.add("faction");
|
||||||
@ -22,7 +23,8 @@ public class CmdFactionsMoneyTransferFp extends FCommand
|
|||||||
|
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.MONEY_F2P.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));
|
||||||
|
|
||||||
this.setHelpShort("transfer f -> p");
|
this.setHelpShort("transfer f -> p");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
senderMustBePlayer = false;
|
||||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -14,7 +15,7 @@ public class CmdFactionsMoneyTransferPf extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsMoneyTransferPf()
|
public CmdFactionsMoneyTransferPf()
|
||||||
{
|
{
|
||||||
this.aliases.add("pf");
|
this.addAliases("pf");
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.requiredArgs.add("amount");
|
||||||
this.requiredArgs.add("player");
|
this.requiredArgs.add("player");
|
||||||
@ -22,7 +23,8 @@ public class CmdFactionsMoneyTransferPf extends FCommand
|
|||||||
|
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.MONEY_P2F.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));
|
||||||
|
|
||||||
this.setHelpShort("transfer p -> f");
|
this.setHelpShort("transfer p -> f");
|
||||||
|
|
||||||
senderMustBePlayer = false;
|
senderMustBePlayer = false;
|
||||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.iface.EconomyParticipator;
|
import com.massivecraft.factions.iface.EconomyParticipator;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
@ -14,13 +15,13 @@ public class CmdFactionsMoneyWithdraw extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsMoneyWithdraw()
|
public CmdFactionsMoneyWithdraw()
|
||||||
{
|
{
|
||||||
this.aliases.add("w");
|
this.addAliases("w", "withdraw");
|
||||||
this.aliases.add("withdraw");
|
|
||||||
|
|
||||||
this.requiredArgs.add("amount");
|
this.requiredArgs.add("amount");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.MONEY_WITHDRAW.node;
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));
|
||||||
|
|
||||||
this.setHelpShort("withdraw money");
|
this.setHelpShort("withdraw money");
|
||||||
|
|
||||||
senderMustBePlayer = true;
|
senderMustBePlayer = true;
|
||||||
|
@ -4,6 +4,7 @@ import com.massivecraft.factions.Faction;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsOfficer extends FCommand
|
public class CmdFactionsOfficer extends FCommand
|
||||||
{
|
{
|
||||||
@ -11,12 +12,13 @@ public class CmdFactionsOfficer extends FCommand
|
|||||||
public CmdFactionsOfficer()
|
public CmdFactionsOfficer()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("officer");
|
|
||||||
|
this.addAliases("officer");
|
||||||
|
|
||||||
this.requiredArgs.add("player name");
|
this.requiredArgs.add("player name");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.OFFICER.node;
|
this.addRequirements(ReqHasPerm.get(Perm.OFFICER.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -4,18 +4,20 @@ import com.massivecraft.factions.ConfServer;
|
|||||||
import com.massivecraft.factions.Faction;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsOpen extends FCommand
|
public class CmdFactionsOpen extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsOpen()
|
public CmdFactionsOpen()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("open");
|
|
||||||
|
this.addAliases("open");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("yes/no", "flip");
|
this.optionalArgs.put("yes/no", "flip");
|
||||||
|
|
||||||
this.permission = Perm.OPEN.node;
|
this.addRequirements(ReqHasPerm.get(Perm.OPEN.node));
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ 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;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsPerm extends FCommand
|
public class CmdFactionsPerm extends FCommand
|
||||||
@ -12,14 +13,15 @@ public class CmdFactionsPerm extends FCommand
|
|||||||
public CmdFactionsPerm()
|
public CmdFactionsPerm()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("perm");
|
|
||||||
|
this.addAliases("perm");
|
||||||
|
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
this.optionalArgs.put("perm", "all");
|
this.optionalArgs.put("perm", "all");
|
||||||
this.optionalArgs.put("relation", "read");
|
this.optionalArgs.put("relation", "read");
|
||||||
this.optionalArgs.put("yes/no", "read");
|
this.optionalArgs.put("yes/no", "read");
|
||||||
|
|
||||||
this.permission = Perm.PERM.node;
|
this.addRequirements(ReqHasPerm.get(Perm.PERM.node));
|
||||||
|
|
||||||
this.errorOnToManyArgs = false;
|
this.errorOnToManyArgs = false;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
|||||||
import com.massivecraft.factions.ConfServer;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsPower extends FCommand
|
public class CmdFactionsPower extends FCommand
|
||||||
{
|
{
|
||||||
@ -10,13 +11,13 @@ public class CmdFactionsPower extends FCommand
|
|||||||
public CmdFactionsPower()
|
public CmdFactionsPower()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("power");
|
|
||||||
this.aliases.add("pow");
|
this.addAliases("power", "pow");
|
||||||
|
|
||||||
//this.requiredArgs.add("faction tag");
|
//this.requiredArgs.add("faction tag");
|
||||||
this.optionalArgs.put("player", "you");
|
this.optionalArgs.put("player", "you");
|
||||||
|
|
||||||
this.permission = Perm.POWER.node;
|
this.addRequirements(ReqHasPerm.get(Perm.POWER.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -4,19 +4,21 @@ import com.massivecraft.factions.Faction;
|
|||||||
import com.massivecraft.factions.FPlayer;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsPowerBoost extends FCommand
|
public class CmdFactionsPowerBoost extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsPowerBoost()
|
public CmdFactionsPowerBoost()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("powerboost");
|
|
||||||
|
this.addAliases("powerboost");
|
||||||
|
|
||||||
this.requiredArgs.add("p|f|player|faction");
|
this.requiredArgs.add("p|f|player|faction");
|
||||||
this.requiredArgs.add("name");
|
this.requiredArgs.add("name");
|
||||||
this.requiredArgs.add("#");
|
this.requiredArgs.add("#");
|
||||||
|
|
||||||
this.permission = Perm.POWERBOOST.node;
|
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,6 +3,7 @@ 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;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsPromote extends FCommand
|
public class CmdFactionsPromote extends FCommand
|
||||||
{
|
{
|
||||||
@ -10,12 +11,13 @@ public class CmdFactionsPromote extends FCommand
|
|||||||
public CmdFactionsPromote()
|
public CmdFactionsPromote()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("promote");
|
|
||||||
|
this.addAliases("promote");
|
||||||
|
|
||||||
this.requiredArgs.add("player name");
|
this.requiredArgs.add("player name");
|
||||||
//this.optionalArgs.put("", "");
|
//this.optionalArgs.put("", "");
|
||||||
|
|
||||||
this.permission = Perm.PROMOTE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.PROMOTE.node));
|
||||||
|
|
||||||
//To promote someone from recruit -> member you must be an officer.
|
//To promote someone from recruit -> member you must be an officer.
|
||||||
//To promote someone from member -> officer you must be a leader.
|
//To promote someone from member -> officer you must be a leader.
|
||||||
|
@ -9,6 +9,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.Rel;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
|
|
||||||
public abstract class CmdFactionsRelationAbstract extends FCommand
|
public abstract class CmdFactionsRelationAbstract extends FCommand
|
||||||
@ -18,10 +19,10 @@ public abstract class CmdFactionsRelationAbstract extends FCommand
|
|||||||
public CmdFactionsRelationAbstract()
|
public CmdFactionsRelationAbstract()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.requiredArgs.add("faction");
|
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.permission = Perm.RELATION.node;
|
this.addAliases("faction");
|
||||||
|
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ 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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
|
|
||||||
public class CmdFactionsSeeChunk extends FCommand
|
public class CmdFactionsSeeChunk extends FCommand
|
||||||
@ -14,10 +15,10 @@ public class CmdFactionsSeeChunk extends FCommand
|
|||||||
public CmdFactionsSeeChunk()
|
public CmdFactionsSeeChunk()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.aliases.add("sc");
|
|
||||||
this.aliases.add("seechunk");
|
|
||||||
|
|
||||||
this.permission = Perm.SEE_CHUNK.node;
|
this.addAliases("sc", "seechunk");
|
||||||
|
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.SEE_CHUNK.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.massivecraft.factions.ConfServer;
|
|||||||
import com.massivecraft.factions.FPerm;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
import com.massivecraft.mcore.ps.PS;
|
import com.massivecraft.mcore.ps.PS;
|
||||||
|
|
||||||
@ -12,12 +13,12 @@ public class CmdFactionsSethome extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsSethome()
|
public CmdFactionsSethome()
|
||||||
{
|
{
|
||||||
this.aliases.add("sethome");
|
this.addAliases("sethome");
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.SETHOME.node;
|
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.Faction;
|
import com.massivecraft.factions.Faction;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.mixin.Mixin;
|
import com.massivecraft.mcore.mixin.Mixin;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
@ -19,13 +20,12 @@ public class CmdFactionsShow extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsShow()
|
public CmdFactionsShow()
|
||||||
{
|
{
|
||||||
this.aliases.add("show");
|
this.addAliases("show", "who");
|
||||||
this.aliases.add("who");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
//this.requiredArgs.add("");
|
||||||
this.optionalArgs.put("faction", "your");
|
this.optionalArgs.put("faction", "your");
|
||||||
|
|
||||||
this.permission = Perm.SHOW.node;
|
this.addRequirements(ReqHasPerm.get(Perm.SHOW.node));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,18 +11,18 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.event.FactionRenameEvent;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsTag extends FCommand
|
public class CmdFactionsTag extends FCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
public CmdFactionsTag()
|
public CmdFactionsTag()
|
||||||
{
|
{
|
||||||
this.aliases.add("tag");
|
this.addAliases("tag");
|
||||||
|
|
||||||
this.requiredArgs.add("new tag");
|
this.requiredArgs.add("new tag");
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.permission = Perm.TAG.node;
|
this.addRequirements(ReqHasPerm.get(Perm.TAG.node));
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
}
|
}
|
||||||
|
@ -4,18 +4,19 @@ 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;
|
||||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.util.Txt;
|
import com.massivecraft.mcore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsTitle extends FCommand
|
public class CmdFactionsTitle extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsTitle()
|
public CmdFactionsTitle()
|
||||||
{
|
{
|
||||||
this.aliases.add("title");
|
this.addAliases("title");
|
||||||
|
|
||||||
this.requiredArgs.add("player");
|
this.requiredArgs.add("player");
|
||||||
this.optionalArgs.put("title", "");
|
this.optionalArgs.put("title", "");
|
||||||
|
|
||||||
this.permission = Perm.TITLE.node;
|
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import com.massivecraft.factions.FPerm;
|
|||||||
import com.massivecraft.factions.Faction;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.mcore.cmd.req.ReqIsPlayer;
|
||||||
import com.massivecraft.mcore.ps.PS;
|
import com.massivecraft.mcore.ps.PS;
|
||||||
|
|
||||||
@ -18,13 +19,9 @@ public class CmdFactionsUnclaim extends FCommand
|
|||||||
{
|
{
|
||||||
public CmdFactionsUnclaim()
|
public CmdFactionsUnclaim()
|
||||||
{
|
{
|
||||||
this.aliases.add("unclaim");
|
this.addAliases("unclaim", "declaim");
|
||||||
this.aliases.add("declaim");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.permission = Perm.UNCLAIM.node;
|
|
||||||
|
|
||||||
this.addRequirements(ReqIsPlayer.get());
|
this.addRequirements(ReqIsPlayer.get());
|
||||||
}
|
}
|
||||||
|
@ -9,18 +9,15 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.event.LandUnclaimAllEvent;
|
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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
public class CmdFactionsUnclaimall extends FCommand
|
public class CmdFactionsUnclaimall extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsUnclaimall()
|
public CmdFactionsUnclaimall()
|
||||||
{
|
{
|
||||||
this.aliases.add("unclaimall");
|
this.addAliases("unclaimall", "declaimall");
|
||||||
this.aliases.add("declaimall");
|
|
||||||
|
|
||||||
//this.requiredArgs.add("");
|
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM_ALL.node));
|
||||||
//this.optionalArgs.put("", "");
|
|
||||||
|
|
||||||
this.permission = Perm.UNCLAIM_ALL.node;
|
|
||||||
|
|
||||||
senderMustBeOfficer = true;
|
senderMustBeOfficer = true;
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,15 @@ 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;
|
||||||
|
import com.massivecraft.mcore.cmd.req.ReqHasPerm;
|
||||||
|
|
||||||
|
|
||||||
public class CmdFactionsVersion extends FCommand
|
public class CmdFactionsVersion extends FCommand
|
||||||
{
|
{
|
||||||
public CmdFactionsVersion()
|
public CmdFactionsVersion()
|
||||||
{
|
{
|
||||||
this.aliases.add("version");
|
this.addAliases("version");
|
||||||
|
this.addRequirements(ReqHasPerm.get(Perm.VERSION.node));
|
||||||
this.permission = Perm.VERSION.node;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user