MassiveCore - Heavy Refactoring and Command improvements
This commit is contained in:
parent
b371ec9c98
commit
753310561a
@ -6,10 +6,10 @@ import org.bukkit.command.CommandSender;
|
|||||||
|
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.massivecore.Predictate;
|
import com.massivecraft.massivecore.Predicate;
|
||||||
import com.massivecraft.massivecore.util.MUtil;
|
import com.massivecraft.massivecore.util.MUtil;
|
||||||
|
|
||||||
public class FactionEqualsPredictate implements Predictate<CommandSender>, Serializable
|
public class FactionEqualsPredicate implements Predicate<CommandSender>, Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ public class FactionEqualsPredictate implements Predictate<CommandSender>, Seria
|
|||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public FactionEqualsPredictate(Faction faction)
|
public FactionEqualsPredicate(Faction faction)
|
||||||
{
|
{
|
||||||
this.factionId = faction.getId();
|
this.factionId = faction.getId();
|
||||||
}
|
}
|
@ -65,57 +65,57 @@ public class CmdFactions extends FactionsCommand
|
|||||||
|
|
||||||
public CmdFactions()
|
public CmdFactions()
|
||||||
{
|
{
|
||||||
// SubCommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsList);
|
this.addChild(this.cmdFactionsList);
|
||||||
this.addSubCommand(this.cmdFactionsFaction);
|
this.addChild(this.cmdFactionsFaction);
|
||||||
this.addSubCommand(this.cmdFactionsPlayer);
|
this.addChild(this.cmdFactionsPlayer);
|
||||||
this.addSubCommand(this.cmdFactionsStatus);
|
this.addChild(this.cmdFactionsStatus);
|
||||||
this.addSubCommand(this.cmdFactionsJoin);
|
this.addChild(this.cmdFactionsJoin);
|
||||||
this.addSubCommand(this.cmdFactionsLeave);
|
this.addChild(this.cmdFactionsLeave);
|
||||||
this.addSubCommand(this.cmdFactionsHome);
|
this.addChild(this.cmdFactionsHome);
|
||||||
this.addSubCommand(this.cmdFactionsMap);
|
this.addChild(this.cmdFactionsMap);
|
||||||
this.addSubCommand(this.cmdFactionsCreate);
|
this.addChild(this.cmdFactionsCreate);
|
||||||
this.addSubCommand(this.cmdFactionsName);
|
this.addChild(this.cmdFactionsName);
|
||||||
this.addSubCommand(this.cmdFactionsDescription);
|
this.addChild(this.cmdFactionsDescription);
|
||||||
this.addSubCommand(this.cmdFactionsMotd);
|
this.addChild(this.cmdFactionsMotd);
|
||||||
this.addSubCommand(this.cmdFactionsSethome);
|
this.addChild(this.cmdFactionsSethome);
|
||||||
this.addSubCommand(this.cmdFactionsUnsethome);
|
this.addChild(this.cmdFactionsUnsethome);
|
||||||
this.addSubCommand(this.cmdFactionsInvite);
|
this.addChild(this.cmdFactionsInvite);
|
||||||
this.addSubCommand(this.cmdFactionsKick);
|
this.addChild(this.cmdFactionsKick);
|
||||||
this.addSubCommand(this.cmdFactionsTitle);
|
this.addChild(this.cmdFactionsTitle);
|
||||||
this.addSubCommand(this.cmdFactionsRank);
|
this.addChild(this.cmdFactionsRank);
|
||||||
this.addSubCommand(this.cmdFactionsRankOldLeader);
|
this.addChild(this.cmdFactionsRankOldLeader);
|
||||||
this.addSubCommand(this.cmdFactionsRankOldOfficer);
|
this.addChild(this.cmdFactionsRankOldOfficer);
|
||||||
this.addSubCommand(this.cmdFactionsRankOldPromote);
|
this.addChild(this.cmdFactionsRankOldPromote);
|
||||||
this.addSubCommand(this.cmdFactionsRankOldDemote);
|
this.addChild(this.cmdFactionsRankOldDemote);
|
||||||
this.addSubCommand(this.cmdFactionsMoney);
|
this.addChild(this.cmdFactionsMoney);
|
||||||
this.addSubCommand(this.cmdFactionsSeeChunk);
|
this.addChild(this.cmdFactionsSeeChunk);
|
||||||
this.addSubCommand(this.cmdFactionsSeeChunkOld);
|
this.addChild(this.cmdFactionsSeeChunkOld);
|
||||||
this.addSubCommand(this.cmdFactionsTerritorytitles);
|
this.addChild(this.cmdFactionsTerritorytitles);
|
||||||
this.addSubCommand(this.cmdFactionsClaim);
|
this.addChild(this.cmdFactionsClaim);
|
||||||
this.addSubCommand(this.cmdFactionsUnclaim);
|
this.addChild(this.cmdFactionsUnclaim);
|
||||||
this.addSubCommand(this.cmdFactionsAccess);
|
this.addChild(this.cmdFactionsAccess);
|
||||||
this.addSubCommand(this.cmdFactionsRelationAlly);
|
this.addChild(this.cmdFactionsRelationAlly);
|
||||||
this.addSubCommand(this.cmdFactionsRelationTruce);
|
this.addChild(this.cmdFactionsRelationTruce);
|
||||||
this.addSubCommand(this.cmdFactionsRelationNeutral);
|
this.addChild(this.cmdFactionsRelationNeutral);
|
||||||
this.addSubCommand(this.cmdFactionsRelationEnemy);
|
this.addChild(this.cmdFactionsRelationEnemy);
|
||||||
this.addSubCommand(this.cmdFactionsPerm);
|
this.addChild(this.cmdFactionsPerm);
|
||||||
this.addSubCommand(this.cmdFactionsFlag);
|
this.addChild(this.cmdFactionsFlag);
|
||||||
this.addSubCommand(this.cmdFactionsUnstuck);
|
this.addChild(this.cmdFactionsUnstuck);
|
||||||
this.addSubCommand(this.cmdFactionsExpansions);
|
this.addChild(this.cmdFactionsExpansions);
|
||||||
this.addSubCommand(this.cmdFactionsTax);
|
this.addChild(this.cmdFactionsTax);
|
||||||
this.addSubCommand(this.cmdFactionsDynmap);
|
this.addChild(this.cmdFactionsDynmap);
|
||||||
this.addSubCommand(this.cmdFactionsAdmin);
|
this.addChild(this.cmdFactionsAdmin);
|
||||||
this.addSubCommand(this.cmdFactionsDisband);
|
this.addChild(this.cmdFactionsDisband);
|
||||||
this.addSubCommand(this.cmdFactionsPowerBoost);
|
this.addChild(this.cmdFactionsPowerBoost);
|
||||||
this.addSubCommand(this.cmdFactionsSetpower);
|
this.addChild(this.cmdFactionsSetpower);
|
||||||
this.addSubCommand(this.cmdFactionsVersion);
|
this.addChild(this.cmdFactionsVersion);
|
||||||
|
|
||||||
// Deprecated Commands
|
// Deprecated Commands
|
||||||
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
|
this.addChild(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
|
||||||
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));
|
this.addChild(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));
|
||||||
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFlag, "open"));
|
this.addChild(new DeprecatedCommand(this.cmdFactionsFlag, "open"));
|
||||||
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who"));
|
this.addChild(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -21,10 +21,10 @@ public class CmdFactionsAccess extends FactionsCommand
|
|||||||
|
|
||||||
public CmdFactionsAccess()
|
public CmdFactionsAccess()
|
||||||
{
|
{
|
||||||
// Add SubCommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsAccessView);
|
this.addChild(this.cmdFactionsAccessView);
|
||||||
this.addSubCommand(this.cmdFactionsAccessPlayer);
|
this.addChild(this.cmdFactionsAccessPlayer);
|
||||||
this.addSubCommand(this.cmdFactionsAccessFaction);
|
this.addChild(this.cmdFactionsAccessFaction);
|
||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("access");
|
this.addAliases("access");
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.BoardColl;
|
import com.massivecraft.factions.entity.BoardColl;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
|
|
||||||
public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
|
public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
|
||||||
{
|
{
|
||||||
@ -20,9 +20,9 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("f", "faction");
|
this.addAliases("f", "faction");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
this.addArg(ARBoolean.get(), "yes/no", "toggle");
|
this.addParameter(TypeBoolean.get(), "yes/no", "toggle");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_FACTION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_FACTION.node));
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.BoardColl;
|
import com.massivecraft.factions.entity.BoardColl;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
|
|
||||||
public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
|
public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
|
||||||
{
|
{
|
||||||
@ -20,9 +20,9 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("p", "player");
|
this.addAliases("p", "player");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
this.addArg(ARBoolean.get(), "yes/no", "toggle");
|
this.addParameter(TypeBoolean.get(), "yes/no", "toggle");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_PLAYER.node));
|
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_PLAYER.node));
|
||||||
|
@ -3,8 +3,8 @@ 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.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
import com.massivecraft.massivecore.util.IdUtil;
|
import com.massivecraft.massivecore.util.IdUtil;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -19,8 +19,8 @@ public class CmdFactionsAdmin extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("admin");
|
this.addAliases("admin");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARBoolean.get(), "on/off", "flip");
|
this.addParameter(TypeBoolean.get(), "on/off", "flip");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));
|
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));
|
||||||
|
@ -26,13 +26,13 @@ public class CmdFactionsClaim extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("claim");
|
this.addAliases("claim");
|
||||||
|
|
||||||
// Add SubCommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsClaimOne);
|
this.addChild(this.cmdFactionsClaimOne);
|
||||||
this.addSubCommand(this.cmdFactionsClaimAuto);
|
this.addChild(this.cmdFactionsClaimAuto);
|
||||||
this.addSubCommand(this.cmdFactionsClaimFill);
|
this.addChild(this.cmdFactionsClaimFill);
|
||||||
this.addSubCommand(this.cmdFactionsClaimSquare);
|
this.addChild(this.cmdFactionsClaimSquare);
|
||||||
this.addSubCommand(this.cmdFactionsClaimCircle);
|
this.addChild(this.cmdFactionsClaimCircle);
|
||||||
this.addSubCommand(this.cmdFactionsClaimAll);
|
this.addChild(this.cmdFactionsClaimAll);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));
|
||||||
|
@ -15,8 +15,8 @@ import com.massivecraft.factions.event.EventFactionsCreate;
|
|||||||
import com.massivecraft.factions.event.EventFactionsMembershipChange;
|
import com.massivecraft.factions.event.EventFactionsMembershipChange;
|
||||||
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
|
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
import com.massivecraft.massivecore.mson.Mson;
|
import com.massivecraft.massivecore.mson.Mson;
|
||||||
import com.massivecraft.massivecore.store.MStore;
|
import com.massivecraft.massivecore.store.MStore;
|
||||||
|
|
||||||
@ -31,8 +31,8 @@ public class CmdFactionsCreate extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("create");
|
this.addAliases("create");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARString.get(), "name");
|
this.addParameter(TypeString.get(), "name");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasntFaction.get());
|
this.addRequirements(ReqHasntFaction.get());
|
||||||
@ -84,7 +84,7 @@ public class CmdFactionsCreate extends FactionsCommand
|
|||||||
|
|
||||||
// Inform
|
// Inform
|
||||||
msg("<i>You created the faction %s", faction.getName(msender));
|
msg("<i>You created the faction %s", faction.getName(msender));
|
||||||
message(Mson.mson(mson("You should now: ").color(ChatColor.YELLOW), Factions.get().getOuterCmdFactions().cmdFactionsDescription.getUseageTemplate()));
|
message(Mson.mson(mson("You should now: ").color(ChatColor.YELLOW), Factions.get().getOuterCmdFactions().cmdFactionsDescription.getTemplate()));
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
if (MConf.get().logFactionCreate)
|
if (MConf.get().logFactionCreate)
|
||||||
|
@ -6,8 +6,8 @@ import com.massivecraft.factions.entity.MPerm;
|
|||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.event.EventFactionsDescriptionChange;
|
import com.massivecraft.factions.event.EventFactionsDescriptionChange;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
import com.massivecraft.massivecore.mixin.Mixin;
|
import com.massivecraft.massivecore.mixin.Mixin;
|
||||||
|
|
||||||
public class CmdFactionsDescription extends FactionsCommand
|
public class CmdFactionsDescription extends FactionsCommand
|
||||||
@ -21,8 +21,8 @@ public class CmdFactionsDescription extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("desc");
|
this.addAliases("desc");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARString.get(), "desc", true);
|
this.addParameter(TypeString.get(), "desc", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.FactionColl;
|
import com.massivecraft.factions.entity.FactionColl;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
@ -28,8 +28,8 @@ public class CmdFactionsDisband extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("disband");
|
this.addAliases("disband");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));
|
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));
|
||||||
|
@ -5,7 +5,7 @@ import java.util.TreeSet;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.event.EventFactionsFactionShowAsync;
|
import com.massivecraft.factions.event.EventFactionsFactionShowAsync;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
@ -27,8 +27,8 @@ public class CmdFactionsFaction extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("f", "faction");
|
this.addAliases("f", "faction");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.FACTION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.FACTION.node));
|
||||||
|
@ -22,10 +22,10 @@ public class CmdFactionsFlag extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("flag");
|
this.addAliases("flag");
|
||||||
|
|
||||||
// Subcommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsFlagList);
|
this.addChild(this.cmdFactionsFlagList);
|
||||||
this.addSubCommand(this.cmdFactionsFlagShow);
|
this.addChild(this.cmdFactionsFlagShow);
|
||||||
this.addSubCommand(this.cmdFactionsFlagSet);
|
this.addChild(this.cmdFactionsFlagSet);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));
|
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));
|
||||||
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.ArgSetting;
|
import com.massivecraft.massivecore.cmd.Parameter;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ public class CmdFactionsFlagList extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("l", "list");
|
this.addAliases("l", "list");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ArgSetting.getPage());
|
this.addParameter(Parameter.getPage());
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.FLAG_LIST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.FLAG_LIST.node));
|
||||||
|
@ -1,15 +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.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMFlag;
|
import com.massivecraft.factions.cmd.type.TypeMFlag;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.event.EventFactionsFlagChange;
|
import com.massivecraft.factions.event.EventFactionsFlagChange;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
|
|
||||||
public class CmdFactionsFlagSet extends FactionsCommand
|
public class CmdFactionsFlagSet extends FactionsCommand
|
||||||
{
|
{
|
||||||
@ -22,10 +22,10 @@ public class CmdFactionsFlagSet extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("set");
|
this.addAliases("set");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMFlag.get(), "flag");
|
this.addParameter(TypeMFlag.get(), "flag");
|
||||||
this.addArg(ARBoolean.get(), "yes/no");
|
this.addParameter(TypeBoolean.get(), "yes/no");
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.FLAG_SET.node));
|
this.addRequirements(ReqHasPerm.get(Perm.FLAG_SET.node));
|
||||||
|
@ -5,14 +5,14 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMFlag;
|
import com.massivecraft.factions.cmd.type.TypeMFlag;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAll;
|
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARSet;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeAll;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeSet;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsFlagShow extends FactionsCommand
|
public class CmdFactionsFlagShow extends FactionsCommand
|
||||||
@ -26,9 +26,9 @@ public class CmdFactionsFlagShow extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("s", "show");
|
this.addAliases("s", "show");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
this.addArg(ARAll.get(ARSet.get(ARMFlag.get(), false)), "flags", "all", true);
|
this.addParameter(TypeAll.get(TypeSet.get(TypeMFlag.get(), false)), "flags", "all", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.FLAG_SHOW.node));
|
this.addRequirements(ReqHasPerm.get(Perm.FLAG_SHOW.node));
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.entity.Player;
|
|||||||
import com.massivecraft.factions.Factions;
|
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.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.BoardColl;
|
import com.massivecraft.factions.entity.BoardColl;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
@ -37,8 +37,8 @@ public class CmdFactionsHome extends FactionsCommandHome
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("home");
|
this.addAliases("home");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
|
this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
|
||||||
@ -73,7 +73,7 @@ public class CmdFactionsHome extends FactionsCommandHome
|
|||||||
if (MPerm.getPermSethome().has(msender, faction, false))
|
if (MPerm.getPermSethome().has(msender, faction, false))
|
||||||
{
|
{
|
||||||
msender.msg("<i>You should:");
|
msender.msg("<i>You should:");
|
||||||
msender.message(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getUseageTemplate());
|
msender.message(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getTemplate());
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -22,10 +22,10 @@ public class CmdFactionsInvite extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("i", "inv", "invite");
|
this.addAliases("i", "inv", "invite");
|
||||||
|
|
||||||
// Add SubCommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsInviteAdd);
|
this.addChild(this.cmdFactionsInviteAdd);
|
||||||
this.addSubCommand(this.cmdFactionsInviteRemove);
|
this.addChild(this.cmdFactionsInviteRemove);
|
||||||
this.addSubCommand(this.cmdFactionsInviteList);
|
this.addChild(this.cmdFactionsInviteList);
|
||||||
|
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
|
@ -6,13 +6,13 @@ import org.bukkit.ChatColor;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.event.EventFactionsInvitedChange;
|
import com.massivecraft.factions.event.EventFactionsInvitedChange;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARSet;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeSet;
|
||||||
import com.massivecraft.massivecore.mson.Mson;
|
import com.massivecraft.massivecore.mson.Mson;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ public class CmdFactionsInviteAdd extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("a", "add");
|
this.addAliases("a", "add");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARSet.get(ARMPlayer.get(), true), "players", true);
|
this.addParameter(TypeSet.get(TypeMPlayer.get(), true), "players", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.INVITE_ADD.node));
|
this.addRequirements(ReqHasPerm.get(Perm.INVITE_ADD.node));
|
||||||
|
@ -4,12 +4,12 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.ArgSetting;
|
import com.massivecraft.massivecore.cmd.Parameter;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.pager.Pager;
|
import com.massivecraft.massivecore.pager.Pager;
|
||||||
import com.massivecraft.massivecore.pager.Stringifier;
|
import com.massivecraft.massivecore.pager.Stringifier;
|
||||||
@ -26,9 +26,9 @@ public class CmdFactionsInviteList extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("l", "list");
|
this.addAliases("l", "list");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ArgSetting.getPage());
|
this.addParameter(Parameter.getPage());
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.INVITE_LIST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.INVITE_LIST.node));
|
||||||
|
@ -9,13 +9,13 @@ import org.bukkit.ChatColor;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.event.EventFactionsInvitedChange;
|
import com.massivecraft.factions.event.EventFactionsInvitedChange;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARSet;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeSet;
|
||||||
import com.massivecraft.massivecore.mson.Mson;
|
import com.massivecraft.massivecore.mson.Mson;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -29,8 +29,8 @@ public class CmdFactionsInviteRemove extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("r", "remove");
|
this.addAliases("r", "remove");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARSet.get(ARMPlayer.get(), true), "players/all", true);
|
this.addParameter(TypeSet.get(TypeMPlayer.get(), true), "players/all", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.INVITE_REMOVE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.INVITE_REMOVE.node));
|
||||||
|
@ -4,8 +4,8 @@ import org.bukkit.ChatColor;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
@ -28,9 +28,9 @@ public class CmdFactionsJoin extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("join");
|
this.addAliases("join");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
this.addArg(ARMPlayer.get(), "player", "you");
|
this.addParameter(TypeMPlayer.get(), "player", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));
|
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));
|
||||||
|
@ -5,7 +5,7 @@ import org.bukkit.ChatColor;
|
|||||||
import com.massivecraft.factions.Factions;
|
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.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.FactionColl;
|
import com.massivecraft.factions.entity.FactionColl;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
@ -29,8 +29,8 @@ public class CmdFactionsKick extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("kick");
|
this.addAliases("kick");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
|
this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
|
||||||
@ -50,7 +50,7 @@ public class CmdFactionsKick extends FactionsCommand
|
|||||||
if (msender == mplayer)
|
if (msender == mplayer)
|
||||||
{
|
{
|
||||||
msg("<b>You can't kick yourself.");
|
msg("<b>You can't kick yourself.");
|
||||||
message(Mson.mson(mson("You might want to: ").color(ChatColor.YELLOW), Factions.get().getOuterCmdFactions().cmdFactionsLeave.getUseageTemplate(false)));
|
message(Mson.mson(mson("You might want to: ").color(ChatColor.YELLOW), Factions.get().getOuterCmdFactions().cmdFactionsLeave.getTemplate(false)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.FactionColl;
|
import com.massivecraft.factions.entity.FactionColl;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.ArgSetting;
|
import com.massivecraft.massivecore.cmd.Parameter;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.pager.Pager;
|
import com.massivecraft.massivecore.pager.Pager;
|
||||||
import com.massivecraft.massivecore.pager.Stringifier;
|
import com.massivecraft.massivecore.pager.Stringifier;
|
||||||
@ -27,8 +27,8 @@ public class CmdFactionsList extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("l", "list");
|
this.addAliases("l", "list");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ArgSetting.getPage());
|
this.addParameter(Parameter.getPage());
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.LIST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.LIST.node));
|
||||||
|
@ -8,9 +8,9 @@ import com.massivecraft.factions.Const;
|
|||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.entity.BoardColl;
|
import com.massivecraft.factions.entity.BoardColl;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.massivecore.cmd.req.ReqIsPlayer;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
import com.massivecraft.massivecore.ps.PS;
|
import com.massivecraft.massivecore.ps.PS;
|
||||||
|
|
||||||
public class CmdFactionsMap extends FactionsCommand
|
public class CmdFactionsMap extends FactionsCommand
|
||||||
@ -24,8 +24,8 @@ public class CmdFactionsMap extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("map");
|
this.addAliases("map");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARBoolean.get(), "on/off", "once");
|
this.addParameter(TypeBoolean.get(), "on/off", "once");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MAP.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MAP.node));
|
||||||
|
@ -23,13 +23,13 @@ public class CmdFactionsMoney extends FactionsCommand
|
|||||||
|
|
||||||
public CmdFactionsMoney()
|
public CmdFactionsMoney()
|
||||||
{
|
{
|
||||||
// Add SubCommands
|
// Children
|
||||||
this.addSubCommand(this.cmdMoneyBalance);
|
this.addChild(this.cmdMoneyBalance);
|
||||||
this.addSubCommand(this.cmdMoneyDeposit);
|
this.addChild(this.cmdMoneyDeposit);
|
||||||
this.addSubCommand(this.cmdMoneyWithdraw);
|
this.addChild(this.cmdMoneyWithdraw);
|
||||||
this.addSubCommand(this.cmdMoneyTransferFf);
|
this.addChild(this.cmdMoneyTransferFf);
|
||||||
this.addSubCommand(this.cmdMoneyTransferFp);
|
this.addChild(this.cmdMoneyTransferFp);
|
||||||
this.addSubCommand(this.cmdMoneyTransferPf);
|
this.addChild(this.cmdMoneyTransferPf);
|
||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("money");
|
this.addAliases("money");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
@ -19,8 +19,8 @@ public class CmdFactionsMoneyBalance extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("b", "balance");
|
this.addAliases("b", "balance");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));
|
||||||
|
@ -2,14 +2,14 @@ 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.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
import com.massivecraft.massivecore.money.Money;
|
import com.massivecraft.massivecore.money.Money;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -26,9 +26,9 @@ public class CmdFactionsMoneyDeposit extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("d", "deposit");
|
this.addAliases("d", "deposit");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARDouble.get(), "amount");
|
this.addParameter(TypeDouble.get(), "amount");
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));
|
||||||
|
@ -1,15 +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.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
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.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
import com.massivecraft.massivecore.money.Money;
|
import com.massivecraft.massivecore.money.Money;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -27,10 +27,10 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("ff");
|
this.addAliases("ff");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARDouble.get(), "amount");
|
this.addParameter(TypeDouble.get(), "amount");
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));
|
||||||
|
@ -1,17 +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.factions.cmd.arg.ARMPlayer;
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
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.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
import com.massivecraft.massivecore.money.Money;
|
import com.massivecraft.massivecore.money.Money;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -29,10 +29,10 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("fp");
|
this.addAliases("fp");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARDouble.get(), "amount");
|
this.addParameter(TypeDouble.get(), "amount");
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));
|
||||||
|
@ -1,17 +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.factions.cmd.arg.ARMPlayer;
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
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.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
import com.massivecraft.massivecore.money.Money;
|
import com.massivecraft.massivecore.money.Money;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -29,10 +29,10 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("pf");
|
this.addAliases("pf");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARDouble.get(), "amount");
|
this.addParameter(TypeDouble.get(), "amount");
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
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.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
import com.massivecraft.massivecore.money.Money;
|
import com.massivecraft.massivecore.money.Money;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -28,9 +28,9 @@ public class CmdFactionsMoneyWithdraw extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("w", "withdraw");
|
this.addAliases("w", "withdraw");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARDouble.get(), "amount");
|
this.addParameter(TypeDouble.get(), "amount");
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));
|
||||||
|
@ -6,8 +6,8 @@ import com.massivecraft.factions.entity.MPlayer;
|
|||||||
import com.massivecraft.factions.event.EventFactionsMotdChange;
|
import com.massivecraft.factions.event.EventFactionsMotdChange;
|
||||||
import com.massivecraft.massivecore.MassiveCore;
|
import com.massivecraft.massivecore.MassiveCore;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
import com.massivecraft.massivecore.mixin.Mixin;
|
import com.massivecraft.massivecore.mixin.Mixin;
|
||||||
import com.massivecraft.massivecore.util.MUtil;
|
import com.massivecraft.massivecore.util.MUtil;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
@ -23,8 +23,8 @@ public class CmdFactionsMotd extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("motd");
|
this.addAliases("motd");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARString.get(), "new", "read", true);
|
this.addParameter(TypeString.get(), "new", "read", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.MOTD.node));
|
this.addRequirements(ReqHasPerm.get(Perm.MOTD.node));
|
||||||
|
@ -3,15 +3,15 @@ package com.massivecraft.factions.cmd;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.FactionColl;
|
import com.massivecraft.factions.entity.FactionColl;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.event.EventFactionsNameChange;
|
import com.massivecraft.factions.event.EventFactionsNameChange;
|
||||||
import com.massivecraft.factions.util.MiscUtil;
|
import com.massivecraft.factions.util.MiscUtil;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
|
|
||||||
public class CmdFactionsName extends FactionsCommand
|
public class CmdFactionsName extends FactionsCommand
|
||||||
{
|
{
|
||||||
@ -24,9 +24,9 @@ public class CmdFactionsName extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("name");
|
this.addAliases("name");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARString.get(), "new name");
|
this.addParameter(TypeString.get(), "new name");
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.NAME.node));
|
this.addRequirements(ReqHasPerm.get(Perm.NAME.node));
|
||||||
|
@ -22,10 +22,10 @@ public class CmdFactionsPerm extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("perm");
|
this.addAliases("perm");
|
||||||
|
|
||||||
// Subcommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsPermList);
|
this.addChild(this.cmdFactionsPermList);
|
||||||
this.addSubCommand(this.cmdFactionsPermShow);
|
this.addChild(this.cmdFactionsPermShow);
|
||||||
this.addSubCommand(this.cmdFactionsPermSet);
|
this.addChild(this.cmdFactionsPermSet);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PERM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PERM.node));
|
||||||
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.ArgSetting;
|
import com.massivecraft.massivecore.cmd.Parameter;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ public class CmdFactionsPermList extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("l", "list");
|
this.addAliases("l", "list");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ArgSetting.getPage());
|
this.addParameter(Parameter.getPage());
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PERM_LIST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PERM_LIST.node));
|
||||||
|
@ -5,15 +5,15 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPerm;
|
import com.massivecraft.factions.cmd.type.TypeMPerm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARRel;
|
import com.massivecraft.factions.cmd.type.TypeRel;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsPermSet extends FactionsCommand
|
public class CmdFactionsPermSet extends FactionsCommand
|
||||||
@ -27,11 +27,11 @@ public class CmdFactionsPermSet extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("set");
|
this.addAliases("set");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPerm.get(), "perm");
|
this.addParameter(TypeMPerm.get(), "perm");
|
||||||
this.addArg(ARRel.get(), "relation");
|
this.addParameter(TypeRel.get(), "relation");
|
||||||
this.addArg(ARBoolean.get(), "yes/no");
|
this.addParameter(TypeBoolean.get(), "yes/no");
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PERM_SET.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PERM_SET.node));
|
||||||
|
@ -5,14 +5,14 @@ import java.util.Collection;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPerm;
|
import com.massivecraft.factions.cmd.type.TypeMPerm;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAll;
|
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARSet;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeAll;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeSet;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsPermShow extends FactionsCommand
|
public class CmdFactionsPermShow extends FactionsCommand
|
||||||
@ -26,9 +26,9 @@ public class CmdFactionsPermShow extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("s", "show");
|
this.addAliases("s", "show");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
this.addArg(ARAll.get(ARSet.get(ARMPerm.get(), false)), "perms", "all", true);
|
this.addParameter(TypeAll.get(TypeSet.get(TypeMPerm.get(), false)), "perms", "all", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PERM_SHOW.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PERM_SHOW.node));
|
||||||
|
@ -4,7 +4,7 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.event.EventFactionsRemovePlayerMillis;
|
import com.massivecraft.factions.event.EventFactionsRemovePlayerMillis;
|
||||||
@ -26,8 +26,8 @@ public class CmdFactionsPlayer extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("p", "player");
|
this.addAliases("p", "player");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player", "you");
|
this.addParameter(TypeMPlayer.get(), "player", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node));
|
this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node));
|
||||||
|
@ -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.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.ArgSetting;
|
import com.massivecraft.massivecore.cmd.Parameter;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
|
|
||||||
public class CmdFactionsPowerBoost extends FactionsCommand
|
public class CmdFactionsPowerBoost extends FactionsCommand
|
||||||
{
|
{
|
||||||
@ -18,8 +18,8 @@ public class CmdFactionsPowerBoost extends FactionsCommand
|
|||||||
// FIELDS
|
// FIELDS
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private ArgSetting<MPlayer> settingMplayer = new ArgSetting<MPlayer>(ARMPlayer.get(), "name");
|
private Parameter<MPlayer> parameterMplayer = new Parameter<MPlayer>(TypeMPlayer.get(), "name");
|
||||||
private ArgSetting<Faction> settingFaction = new ArgSetting<Faction>(ARFaction.get(), "name");
|
private Parameter<Faction> parameterFaction = new Parameter<Faction>(TypeFaction.get(), "name");
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
@ -30,10 +30,10 @@ public class CmdFactionsPowerBoost extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("powerboost");
|
this.addAliases("powerboost");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARString.get(), "p|f|player|faction");
|
this.addParameter(TypeString.get(), "p|f|player|faction");
|
||||||
this.addArg(settingMplayer);
|
this.addParameter(parameterMplayer);
|
||||||
this.addArg(ARDouble.get(), "#");
|
this.addParameter(TypeDouble.get(), "#");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
|
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
|
||||||
@ -65,7 +65,7 @@ public class CmdFactionsPowerBoost extends FactionsCommand
|
|||||||
|
|
||||||
if (doPlayer)
|
if (doPlayer)
|
||||||
{
|
{
|
||||||
this.getArgSettings().set(1, settingMplayer);
|
this.getParameters().set(1, parameterMplayer);
|
||||||
MPlayer targetPlayer = this.readArgAt(1);
|
MPlayer targetPlayer = this.readArgAt(1);
|
||||||
|
|
||||||
targetPlayer.setPowerBoost(targetPower);
|
targetPlayer.setPowerBoost(targetPower);
|
||||||
@ -73,7 +73,7 @@ public class CmdFactionsPowerBoost extends FactionsCommand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.getArgSettings().set(1, settingFaction);
|
this.getParameters().set(1, parameterFaction);
|
||||||
Faction targetFaction = this.readArgAt(1);
|
Faction targetFaction = this.readArgAt(1);
|
||||||
|
|
||||||
targetFaction.setPowerBoost(targetPower);
|
targetFaction.setPowerBoost(targetPower);
|
||||||
|
@ -6,9 +6,9 @@ import java.util.Set;
|
|||||||
import com.massivecraft.factions.Factions;
|
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.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.cmd.arg.ARRank;
|
import com.massivecraft.factions.cmd.type.TypeRank;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
@ -49,7 +49,7 @@ public class CmdFactionsRank extends FactionsCommand
|
|||||||
private Rel rank = null;
|
private Rel rank = null;
|
||||||
|
|
||||||
// This one is permanent
|
// This one is permanent
|
||||||
private ARRank rankReader = new ARRank();
|
private TypeRank rankReader = new TypeRank();
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CONSTRUCT
|
// CONSTRUCT
|
||||||
@ -60,10 +60,10 @@ public class CmdFactionsRank extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("rank");
|
this.addAliases("rank");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
this.addArg(rankReader, "action", "show");
|
this.addParameter(rankReader, "action", "show");
|
||||||
this.addArg(ARFaction.get(), "faction", "their");
|
this.addParameter(TypeFaction.get(), "faction", "their");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.RANK.node));
|
this.addRequirements(ReqHasPerm.get(Perm.RANK.node));
|
||||||
@ -113,11 +113,15 @@ public class CmdFactionsRank extends FactionsCommand
|
|||||||
|
|
||||||
// This is always run after performing a MassiveCommand.
|
// This is always run after performing a MassiveCommand.
|
||||||
@Override
|
@Override
|
||||||
public void unsetSenderVars()
|
public void senderFields(boolean set)
|
||||||
|
{
|
||||||
|
super.senderFields(set);
|
||||||
|
|
||||||
|
if ( ! set)
|
||||||
{
|
{
|
||||||
super.unsetSenderVars();
|
|
||||||
this.unregisterFields();
|
this.unregisterFields();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// PRIVATE: REGISTER & UNREGISTER
|
// PRIVATE: REGISTER & UNREGISTER
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.massivecore.cmd.VisibilityMode;
|
import com.massivecraft.massivecore.cmd.Visibility;
|
||||||
import com.massivecraft.massivecore.util.MUtil;
|
import com.massivecraft.massivecore.util.MUtil;
|
||||||
|
|
||||||
public class CmdFactionsRankOld extends FactionsCommand
|
public class CmdFactionsRankOld extends FactionsCommand
|
||||||
@ -26,12 +26,12 @@ public class CmdFactionsRankOld extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases(rankName);
|
this.addAliases(rankName);
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
this.addArg(ARFaction.get(), "faction", "their");
|
this.addParameter(TypeFaction.get(), "faction", "their");
|
||||||
|
|
||||||
// VisibilityMode
|
// Visibility
|
||||||
this.setVisibilityMode(VisibilityMode.INVISIBLE);
|
this.setVisibility(Visibility.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -3,8 +3,8 @@ 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.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqHasFaction;
|
import com.massivecraft.factions.cmd.req.ReqHasFaction;
|
||||||
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
@ -26,7 +26,7 @@ public abstract class CmdFactionsRelationAbstract extends FactionsCommand
|
|||||||
public CmdFactionsRelationAbstract()
|
public CmdFactionsRelationAbstract()
|
||||||
{
|
{
|
||||||
// Aliases
|
// Aliases
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));
|
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));
|
||||||
|
@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqIsPlayer;
|
import com.massivecraft.massivecore.cmd.req.ReqIsPlayer;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsSeeChunk extends FactionsCommand
|
public class CmdFactionsSeeChunk extends FactionsCommand
|
||||||
@ -18,8 +18,8 @@ public class CmdFactionsSeeChunk extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("sc", "seechunk");
|
this.addAliases("sc", "seechunk");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARBoolean.get(), "active", "toggle");
|
this.addParameter(TypeBoolean.get(), "active", "toggle");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.SEECHUNK.node));
|
this.addRequirements(ReqHasPerm.get(Perm.SEECHUNK.node));
|
||||||
|
@ -4,7 +4,7 @@ import java.util.Collections;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.FactionColl;
|
import com.massivecraft.factions.entity.FactionColl;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
@ -36,10 +36,10 @@ public class CmdFactionsSetAuto extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("a", "auto");
|
this.addAliases("a", "auto");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
if (claim)
|
if (claim)
|
||||||
{
|
{
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
|
|
||||||
public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
|
public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
|
||||||
{
|
{
|
||||||
@ -16,12 +16,12 @@ public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
|
|||||||
// Super
|
// Super
|
||||||
super(claim);
|
super(claim);
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARString.get(), "all|map");
|
this.addParameter(TypeString.get(), "all|map");
|
||||||
this.addArg(ARFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction");
|
||||||
if (claim)
|
if (claim)
|
||||||
{
|
{
|
||||||
this.addArg(ARFaction.get(), "newfaction");
|
this.addParameter(TypeFaction.get(), "newfaction");
|
||||||
this.setFactionArgIndex(2);
|
this.setFactionArgIndex(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARInteger;
|
import com.massivecraft.massivecore.cmd.type.TypeInteger;
|
||||||
|
|
||||||
|
|
||||||
public abstract class CmdFactionsSetXRadius extends CmdFactionsSetX
|
public abstract class CmdFactionsSetXRadius extends CmdFactionsSetX
|
||||||
@ -17,11 +17,11 @@ public abstract class CmdFactionsSetXRadius extends CmdFactionsSetX
|
|||||||
// Super
|
// Super
|
||||||
super(claim);
|
super(claim);
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(1, ARInteger.get(), "radius");
|
this.addParameter(1, TypeInteger.get(), "radius");
|
||||||
if (claim)
|
if (claim)
|
||||||
{
|
{
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
this.setFactionArgIndex(1);
|
this.setFactionArgIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
|
|
||||||
public abstract class CmdFactionsSetXSimple extends CmdFactionsSetX
|
public abstract class CmdFactionsSetXSimple extends CmdFactionsSetX
|
||||||
{
|
{
|
||||||
@ -13,10 +13,10 @@ public abstract class CmdFactionsSetXSimple extends CmdFactionsSetX
|
|||||||
// Super
|
// Super
|
||||||
super(claim);
|
super(claim);
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
if (claim)
|
if (claim)
|
||||||
{
|
{
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
this.setFactionArgIndex(0);
|
this.setFactionArgIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ 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.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.event.EventFactionsHomeChange;
|
import com.massivecraft.factions.event.EventFactionsHomeChange;
|
||||||
@ -22,8 +22,8 @@ public class CmdFactionsSethome extends FactionsCommandHome
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("sethome");
|
this.addAliases("sethome");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
|
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
|
||||||
@ -63,7 +63,7 @@ public class CmdFactionsSethome extends FactionsCommandHome
|
|||||||
|
|
||||||
// Inform
|
// Inform
|
||||||
faction.msg("%s<i> set the home for your faction. You can now use:", msender.describeTo(msenderFaction, true));
|
faction.msg("%s<i> set the home for your faction. You can now use:", msender.describeTo(msenderFaction, true));
|
||||||
faction.sendMessage(Factions.get().getOuterCmdFactions().cmdFactionsHome.getUseageTemplate());
|
faction.sendMessage(Factions.get().getOuterCmdFactions().cmdFactionsHome.getTemplate());
|
||||||
if (faction != msenderFaction)
|
if (faction != msenderFaction)
|
||||||
{
|
{
|
||||||
msender.msg("<i>You have set the home for " + faction.getName(msender) + "<i>.");
|
msender.msg("<i>You have set the home for " + faction.getName(msender) + "<i>.");
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.event.EventFactionsPowerChange;
|
import com.massivecraft.factions.event.EventFactionsPowerChange;
|
||||||
import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason;
|
import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARDouble;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeDouble;
|
||||||
|
|
||||||
public class CmdFactionsSetpower extends FactionsCommand
|
public class CmdFactionsSetpower extends FactionsCommand
|
||||||
{
|
{
|
||||||
@ -20,9 +20,9 @@ public class CmdFactionsSetpower extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("sp", "setpower");
|
this.addAliases("sp", "setpower");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
this.addArg(ARDouble.get(), "power");
|
this.addParameter(TypeDouble.get(), "power");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.SETPOWER.node));
|
this.addRequirements(ReqHasPerm.get(Perm.SETPOWER.node));
|
||||||
|
@ -7,13 +7,13 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.PlayerInactivityComparator;
|
import com.massivecraft.factions.PlayerInactivityComparator;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.cmd.arg.ARSortMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeSortMPlayer;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.ArgSetting;
|
import com.massivecraft.massivecore.cmd.Parameter;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.pager.Pager;
|
import com.massivecraft.massivecore.pager.Pager;
|
||||||
import com.massivecraft.massivecore.pager.Stringifier;
|
import com.massivecraft.massivecore.pager.Stringifier;
|
||||||
@ -33,10 +33,10 @@ public class CmdFactionsStatus extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("s", "status");
|
this.addAliases("s", "status");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ArgSetting.getPage());
|
this.addParameter(Parameter.getPage());
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
this.addArg(ARSortMPlayer.get(), "sort by", "time");
|
this.addParameter(TypeSortMPlayer.get(), "sort by", "time");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.STATUS.node));
|
this.addRequirements(ReqHasPerm.get(Perm.STATUS.node));
|
||||||
|
@ -2,10 +2,10 @@ package com.massivecraft.factions.cmd;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.VisibilityMode;
|
import com.massivecraft.massivecore.cmd.Visibility;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqTitlesAvailable;
|
import com.massivecraft.massivecore.cmd.req.ReqTitlesAvailable;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
|
||||||
import com.massivecraft.massivecore.mixin.Mixin;
|
import com.massivecraft.massivecore.mixin.Mixin;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
@ -20,8 +20,8 @@ public class CmdFactionsTerritorytitles extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("tt", "territorytitles");
|
this.addAliases("tt", "territorytitles");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARBoolean.get(), "on|off", "toggle");
|
this.addParameter(TypeBoolean.get(), "on|off", "toggle");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.TERRITORYTITLES.node));
|
this.addRequirements(ReqHasPerm.get(Perm.TERRITORYTITLES.node));
|
||||||
@ -33,11 +33,11 @@ public class CmdFactionsTerritorytitles extends FactionsCommand
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VisibilityMode getVisibilityMode()
|
public Visibility getVisibility()
|
||||||
{
|
{
|
||||||
// We hide the command if titles aren't available.
|
// We hide the command if titles aren't available.
|
||||||
if ( ! Mixin.isTitlesAvailable()) return VisibilityMode.INVISIBLE;
|
if ( ! Mixin.isTitlesAvailable()) return Visibility.INVISIBLE;
|
||||||
return super.getVisibilityMode();
|
return super.getVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -3,13 +3,13 @@ package com.massivecraft.factions.cmd;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARMPlayer;
|
import com.massivecraft.factions.cmd.type.TypeMPlayer;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.event.EventFactionsTitleChange;
|
import com.massivecraft.factions.event.EventFactionsTitleChange;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARString;
|
|
||||||
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
|
||||||
|
import com.massivecraft.massivecore.cmd.type.TypeString;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class CmdFactionsTitle extends FactionsCommand
|
public class CmdFactionsTitle extends FactionsCommand
|
||||||
@ -23,9 +23,9 @@ public class CmdFactionsTitle extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("title");
|
this.addAliases("title");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARMPlayer.get(), "player");
|
this.addParameter(TypeMPlayer.get(), "player");
|
||||||
this.addArg(ARString.get(), "title", "", true);
|
this.addParameter(TypeString.get(), "title", "", true);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));
|
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));
|
||||||
|
@ -26,13 +26,13 @@ public class CmdFactionsUnclaim extends FactionsCommand
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("unclaim");
|
this.addAliases("unclaim");
|
||||||
|
|
||||||
// Add SubCommands
|
// Children
|
||||||
this.addSubCommand(this.cmdFactionsUnclaimOne);
|
this.addChild(this.cmdFactionsUnclaimOne);
|
||||||
this.addSubCommand(this.cmdFactionsUnclaimAuto);
|
this.addChild(this.cmdFactionsUnclaimAuto);
|
||||||
this.addSubCommand(this.cmdFactionsUnclaimFill);
|
this.addChild(this.cmdFactionsUnclaimFill);
|
||||||
this.addSubCommand(this.cmdFactionsUnclaimSquare);
|
this.addChild(this.cmdFactionsUnclaimSquare);
|
||||||
this.addSubCommand(this.cmdFactionsUnclaimCircle);
|
this.addChild(this.cmdFactionsUnclaimCircle);
|
||||||
this.addSubCommand(this.cmdFactionsUnclaimAll);
|
this.addChild(this.cmdFactionsUnclaimAll);
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));
|
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.cmd.arg.ARFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
import com.massivecraft.factions.entity.Faction;
|
import com.massivecraft.factions.entity.Faction;
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.factions.event.EventFactionsHomeChange;
|
import com.massivecraft.factions.event.EventFactionsHomeChange;
|
||||||
@ -19,8 +19,8 @@ public class CmdFactionsUnsethome extends FactionsCommandHome
|
|||||||
// Aliases
|
// Aliases
|
||||||
this.addAliases("unsethome");
|
this.addAliases("unsethome");
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.addArg(ARFaction.get(), "faction", "you");
|
this.addParameter(TypeFaction.get(), "faction", "you");
|
||||||
|
|
||||||
// Requirements
|
// Requirements
|
||||||
this.addRequirements(ReqHasPerm.get(Perm.UNSETHOME.node));
|
this.addRequirements(ReqHasPerm.get(Perm.UNSETHOME.node));
|
||||||
|
@ -23,8 +23,8 @@ public class CmdFactionsXPlaceholder extends FactionsCommand
|
|||||||
// Desc
|
// Desc
|
||||||
this.setDesc("Use " + extensionName);
|
this.setDesc("Use " + extensionName);
|
||||||
|
|
||||||
// Args
|
// Parameters
|
||||||
this.setGivingErrorOnTooManyArgs(false);
|
this.setOverflowSensitive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -18,18 +18,10 @@ public class FactionsCommand extends MassiveCommand
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fixSenderVars()
|
public void senderFields(boolean set)
|
||||||
{
|
{
|
||||||
this.msender = MPlayer.get(sender);
|
this.msender = set ? MPlayer.get(sender) : null;
|
||||||
this.msenderFaction = this.msender.getFaction();
|
this.msenderFaction = set ? this.msender.getFaction() : null;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void unsetSenderVars()
|
|
||||||
{
|
|
||||||
this.msender = null;
|
|
||||||
this.msenderFaction = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
|
|||||||
|
|
||||||
import com.massivecraft.factions.cmd.req.ReqFactionHomesEnabled;
|
import com.massivecraft.factions.cmd.req.ReqFactionHomesEnabled;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
import com.massivecraft.massivecore.cmd.VisibilityMode;
|
import com.massivecraft.massivecore.cmd.Visibility;
|
||||||
|
|
||||||
public class FactionsCommandHome extends FactionsCommand
|
public class FactionsCommandHome extends FactionsCommand
|
||||||
{
|
{
|
||||||
@ -20,9 +20,9 @@ public class FactionsCommandHome extends FactionsCommand
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VisibilityMode getVisibilityMode()
|
public Visibility getVisibility()
|
||||||
{
|
{
|
||||||
return MConf.get().homesEnabled ? super.getVisibilityMode() : VisibilityMode.INVISIBLE;
|
return MConf.get().homesEnabled ? super.getVisibility() : Visibility.INVISIBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -14,17 +14,17 @@ import com.massivecraft.factions.entity.MPlayerColl;
|
|||||||
import com.massivecraft.massivecore.CaseInsensitiveComparator;
|
import com.massivecraft.massivecore.CaseInsensitiveComparator;
|
||||||
import com.massivecraft.massivecore.MassiveCore;
|
import com.massivecraft.massivecore.MassiveCore;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAbstract;
|
import com.massivecraft.massivecore.cmd.type.TypeAbstract;
|
||||||
import com.massivecraft.massivecore.util.IdUtil;
|
import com.massivecraft.massivecore.util.IdUtil;
|
||||||
|
|
||||||
public class ARFaction extends ARAbstract<Faction>
|
public class TypeFaction extends TypeAbstract<Faction>
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static ARFaction i = new ARFaction();
|
private static TypeFaction i = new TypeFaction();
|
||||||
public static ARFaction get() { return i; }
|
public static TypeFaction get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -1,4 +1,4 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -7,18 +7,18 @@ import java.util.List;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import com.massivecraft.factions.entity.MFlag;
|
import com.massivecraft.factions.entity.MFlag;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
|
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAllAble;
|
import com.massivecraft.massivecore.cmd.type.TypeAllAble;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class ARMFlag extends ARAbstractSelect<MFlag> implements ARAllAble<MFlag>
|
public class TypeMFlag extends TypeAbstractSelect<MFlag> implements TypeAllAble<MFlag>
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static ARMFlag i = new ARMFlag();
|
private static TypeMFlag i = new TypeMFlag();
|
||||||
public static ARMFlag get() { return i; }
|
public static TypeMFlag get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -1,4 +1,4 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -7,18 +7,18 @@ import java.util.List;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import com.massivecraft.factions.entity.MPerm;
|
import com.massivecraft.factions.entity.MPerm;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
|
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAllAble;
|
import com.massivecraft.massivecore.cmd.type.TypeAllAble;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class ARMPerm extends ARAbstractSelect<MPerm> implements ARAllAble<MPerm>
|
public class TypeMPerm extends TypeAbstractSelect<MPerm> implements TypeAllAble<MPerm>
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static ARMPerm i = new ARMPerm();
|
private static TypeMPerm i = new TypeMPerm();
|
||||||
public static ARMPerm get() { return i; }
|
public static TypeMPerm get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -1,18 +1,18 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.factions.entity.MPlayerColl;
|
import com.massivecraft.factions.entity.MPlayerColl;
|
||||||
import com.massivecraft.massivecore.cmd.arg.AR;
|
import com.massivecraft.massivecore.cmd.type.Type;
|
||||||
|
|
||||||
public class ARMPlayer
|
public class TypeMPlayer
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static AR<MPlayer> get()
|
public static Type<MPlayer> get()
|
||||||
{
|
{
|
||||||
return MPlayerColl.get().getAREntity();
|
return MPlayerColl.get().getTypeEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -8,11 +8,11 @@ import org.bukkit.command.CommandSender;
|
|||||||
|
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.massivecore.MassiveException;
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
|
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
|
||||||
import com.massivecraft.massivecore.util.MUtil;
|
import com.massivecraft.massivecore.util.MUtil;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class ARRank extends ARAbstractSelect<Rel>
|
public class TypeRank extends TypeAbstractSelect<Rel>
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CONSTANTS
|
// CONSTANTS
|
||||||
@ -32,18 +32,18 @@ public class ARRank extends ARAbstractSelect<Rel>
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
// Default constructor. Can't use promote and demote.
|
// Default constructor. Can't use promote and demote.
|
||||||
private static ARRank i = new ARRank();
|
private static TypeRank i = new TypeRank();
|
||||||
public static ARRank get() { return i; }
|
public static TypeRank get() { return i; }
|
||||||
|
|
||||||
public ARRank()
|
public TypeRank()
|
||||||
{
|
{
|
||||||
this.startRank = null;
|
this.startRank = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fancy constructor. Can use promote and demote.
|
// Fancy constructor. Can use promote and demote.
|
||||||
public static ARRank get(Rel rank) { return new ARRank(rank); }
|
public static TypeRank get(Rel rank) { return new TypeRank(rank); }
|
||||||
|
|
||||||
public ARRank(Rel rank)
|
public TypeRank(Rel rank)
|
||||||
{
|
{
|
||||||
if (rank == null) throw new IllegalArgumentException("Do not use null, the default constructor can be used however.");
|
if (rank == null) throw new IllegalArgumentException("Do not use null, the default constructor can be used however.");
|
||||||
if ( ! rank.isRank()) throw new IllegalArgumentException(rank + " is not a valid rank");
|
if ( ! rank.isRank()) throw new IllegalArgumentException(rank + " is not a valid rank");
|
@ -1,4 +1,4 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -7,17 +7,17 @@ import java.util.List;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
|
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
|
||||||
import com.massivecraft.massivecore.util.Txt;
|
import com.massivecraft.massivecore.util.Txt;
|
||||||
|
|
||||||
public class ARRel extends ARAbstractSelect<Rel>
|
public class TypeRel extends TypeAbstractSelect<Rel>
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static ARRel i = new ARRel();
|
private static TypeRel i = new TypeRel();
|
||||||
public static ARRel get() { return i; }
|
public static TypeRel get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -1,4 +1,4 @@
|
|||||||
package com.massivecraft.factions.cmd.arg;
|
package com.massivecraft.factions.cmd.type;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -11,10 +11,10 @@ import com.massivecraft.factions.PlayerInactivityComparator;
|
|||||||
import com.massivecraft.factions.PlayerPowerComparator;
|
import com.massivecraft.factions.PlayerPowerComparator;
|
||||||
import com.massivecraft.factions.PlayerRoleComparator;
|
import com.massivecraft.factions.PlayerRoleComparator;
|
||||||
import com.massivecraft.factions.entity.MPlayer;
|
import com.massivecraft.factions.entity.MPlayer;
|
||||||
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
|
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
|
||||||
import com.massivecraft.massivecore.util.MUtil;
|
import com.massivecraft.massivecore.util.MUtil;
|
||||||
|
|
||||||
public class ARSortMPlayer extends ARAbstractSelect<Comparator<MPlayer>>
|
public class TypeSortMPlayer extends TypeAbstractSelect<Comparator<MPlayer>>
|
||||||
{
|
{
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// CONSTANTS
|
// CONSTANTS
|
||||||
@ -26,8 +26,8 @@ public class ARSortMPlayer extends ARAbstractSelect<Comparator<MPlayer>>
|
|||||||
// INSTANCE & CONSTRUCT
|
// INSTANCE & CONSTRUCT
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
private static ARSortMPlayer i = new ARSortMPlayer();
|
private static TypeSortMPlayer i = new TypeSortMPlayer();
|
||||||
public static ARSortMPlayer get() { return i; }
|
public static TypeSortMPlayer get() { return i; }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// OVERRIDE
|
// OVERRIDE
|
@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.massivecraft.factions.EconomyParticipator;
|
import com.massivecraft.factions.EconomyParticipator;
|
||||||
import com.massivecraft.factions.FactionEqualsPredictate;
|
import com.massivecraft.factions.FactionEqualsPredicate;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.Lang;
|
import com.massivecraft.factions.Lang;
|
||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
@ -1213,34 +1213,34 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
|
|||||||
|
|
||||||
public boolean sendMessage(Object message)
|
public boolean sendMessage(Object message)
|
||||||
{
|
{
|
||||||
return Mixin.messagePredictate(new FactionEqualsPredictate(this), message);
|
return Mixin.messagePredicate(new FactionEqualsPredicate(this), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sendMessage(Object... messages)
|
public boolean sendMessage(Object... messages)
|
||||||
{
|
{
|
||||||
return Mixin.messagePredictate(new FactionEqualsPredictate(this), messages);
|
return Mixin.messagePredicate(new FactionEqualsPredicate(this), messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean sendMessage(Collection<Object> messages)
|
public boolean sendMessage(Collection<Object> messages)
|
||||||
{
|
{
|
||||||
return Mixin.messagePredictate(new FactionEqualsPredictate(this), messages);
|
return Mixin.messagePredicate(new FactionEqualsPredicate(this), messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CONVENIENCE MSG
|
// CONVENIENCE MSG
|
||||||
|
|
||||||
public boolean msg(String msg)
|
public boolean msg(String msg)
|
||||||
{
|
{
|
||||||
return Mixin.msgPredictate(new FactionEqualsPredictate(this), msg);
|
return Mixin.msgPredicate(new FactionEqualsPredicate(this), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean msg(String msg, Object... args)
|
public boolean msg(String msg, Object... args)
|
||||||
{
|
{
|
||||||
return Mixin.msgPredictate(new FactionEqualsPredictate(this), msg, args);
|
return Mixin.msgPredicate(new FactionEqualsPredicate(this), msg, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean msg(Collection<String> msgs)
|
public boolean msg(Collection<String> msgs)
|
||||||
{
|
{
|
||||||
return Mixin.msgPredictate(new FactionEqualsPredictate(this), msgs);
|
return Mixin.msgPredicate(new FactionEqualsPredicate(this), msgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.massivecraft.factions.entity;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.massivecraft.factions.event.EventFactionsCreateFlags;
|
import com.massivecraft.factions.event.EventFactionsCreateFlags;
|
||||||
import com.massivecraft.massivecore.PredictateIsRegistered;
|
import com.massivecraft.massivecore.PredicateIsRegistered;
|
||||||
import com.massivecraft.massivecore.Prioritized;
|
import com.massivecraft.massivecore.Prioritized;
|
||||||
import com.massivecraft.massivecore.PriorityComparator;
|
import com.massivecraft.massivecore.PriorityComparator;
|
||||||
import com.massivecraft.massivecore.Registerable;
|
import com.massivecraft.massivecore.Registerable;
|
||||||
@ -63,7 +63,7 @@ public class MFlag extends Entity<MFlag> implements Prioritized, Registerable
|
|||||||
{
|
{
|
||||||
setupStandardFlags();
|
setupStandardFlags();
|
||||||
new EventFactionsCreateFlags(isAsync).run();
|
new EventFactionsCreateFlags(isAsync).run();
|
||||||
return MFlagColl.get().getAll(PredictateIsRegistered.get(), PriorityComparator.get());
|
return MFlagColl.get().getAll(PredicateIsRegistered.get(), PriorityComparator.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupStandardFlags()
|
public static void setupStandardFlags()
|
||||||
|
@ -12,7 +12,7 @@ import com.massivecraft.factions.Perm;
|
|||||||
import com.massivecraft.factions.Rel;
|
import com.massivecraft.factions.Rel;
|
||||||
import com.massivecraft.factions.TerritoryAccess;
|
import com.massivecraft.factions.TerritoryAccess;
|
||||||
import com.massivecraft.factions.event.EventFactionsCreatePerms;
|
import com.massivecraft.factions.event.EventFactionsCreatePerms;
|
||||||
import com.massivecraft.massivecore.PredictateIsRegistered;
|
import com.massivecraft.massivecore.PredicateIsRegistered;
|
||||||
import com.massivecraft.massivecore.Prioritized;
|
import com.massivecraft.massivecore.Prioritized;
|
||||||
import com.massivecraft.massivecore.PriorityComparator;
|
import com.massivecraft.massivecore.PriorityComparator;
|
||||||
import com.massivecraft.massivecore.Registerable;
|
import com.massivecraft.massivecore.Registerable;
|
||||||
@ -98,7 +98,7 @@ public class MPerm extends Entity<MPerm> implements Prioritized, Registerable
|
|||||||
setupStandardPerms();
|
setupStandardPerms();
|
||||||
new EventFactionsCreatePerms().run();
|
new EventFactionsCreatePerms().run();
|
||||||
|
|
||||||
return MPermColl.get().getAll(PredictateIsRegistered.get(), PriorityComparator.get());
|
return MPermColl.get().getAll(PredicateIsRegistered.get(), PriorityComparator.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupStandardPerms()
|
public static void setupStandardPerms()
|
||||||
@ -297,7 +297,7 @@ public class MPerm extends Entity<MPerm> implements Prioritized, Registerable
|
|||||||
Player player = mplayer.getPlayer();
|
Player player = mplayer.getPlayer();
|
||||||
if (player != null && Perm.ADMIN.has(player))
|
if (player != null && Perm.ADMIN.has(player))
|
||||||
{
|
{
|
||||||
ret += Txt.parse("\n<i>You can bypass by using " + Factions.get().getOuterCmdFactions().cmdFactionsAdmin.getUseageTemplate(false).toPlain(true));
|
ret += Txt.parse("\n<i>You can bypass by using " + Factions.get().getOuterCmdFactions().cmdFactionsAdmin.getTemplate(false).toPlain(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user