MassiveCore - Heavy Refactoring and Command improvements

This commit is contained in:
Olof Larsson 2015-10-21 19:35:41 +02:00
parent b371ec9c98
commit 753310561a
67 changed files with 376 additions and 380 deletions

View File

@ -6,10 +6,10 @@ import org.bukkit.command.CommandSender;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.massivecore.Predictate;
import com.massivecraft.massivecore.Predicate;
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;
@ -24,7 +24,7 @@ public class FactionEqualsPredictate implements Predictate<CommandSender>, Seria
// CONSTRUCT
// -------------------------------------------- //
public FactionEqualsPredictate(Faction faction)
public FactionEqualsPredicate(Faction faction)
{
this.factionId = faction.getId();
}

View File

@ -65,57 +65,57 @@ public class CmdFactions extends FactionsCommand
public CmdFactions()
{
// SubCommands
this.addSubCommand(this.cmdFactionsList);
this.addSubCommand(this.cmdFactionsFaction);
this.addSubCommand(this.cmdFactionsPlayer);
this.addSubCommand(this.cmdFactionsStatus);
this.addSubCommand(this.cmdFactionsJoin);
this.addSubCommand(this.cmdFactionsLeave);
this.addSubCommand(this.cmdFactionsHome);
this.addSubCommand(this.cmdFactionsMap);
this.addSubCommand(this.cmdFactionsCreate);
this.addSubCommand(this.cmdFactionsName);
this.addSubCommand(this.cmdFactionsDescription);
this.addSubCommand(this.cmdFactionsMotd);
this.addSubCommand(this.cmdFactionsSethome);
this.addSubCommand(this.cmdFactionsUnsethome);
this.addSubCommand(this.cmdFactionsInvite);
this.addSubCommand(this.cmdFactionsKick);
this.addSubCommand(this.cmdFactionsTitle);
this.addSubCommand(this.cmdFactionsRank);
this.addSubCommand(this.cmdFactionsRankOldLeader);
this.addSubCommand(this.cmdFactionsRankOldOfficer);
this.addSubCommand(this.cmdFactionsRankOldPromote);
this.addSubCommand(this.cmdFactionsRankOldDemote);
this.addSubCommand(this.cmdFactionsMoney);
this.addSubCommand(this.cmdFactionsSeeChunk);
this.addSubCommand(this.cmdFactionsSeeChunkOld);
this.addSubCommand(this.cmdFactionsTerritorytitles);
this.addSubCommand(this.cmdFactionsClaim);
this.addSubCommand(this.cmdFactionsUnclaim);
this.addSubCommand(this.cmdFactionsAccess);
this.addSubCommand(this.cmdFactionsRelationAlly);
this.addSubCommand(this.cmdFactionsRelationTruce);
this.addSubCommand(this.cmdFactionsRelationNeutral);
this.addSubCommand(this.cmdFactionsRelationEnemy);
this.addSubCommand(this.cmdFactionsPerm);
this.addSubCommand(this.cmdFactionsFlag);
this.addSubCommand(this.cmdFactionsUnstuck);
this.addSubCommand(this.cmdFactionsExpansions);
this.addSubCommand(this.cmdFactionsTax);
this.addSubCommand(this.cmdFactionsDynmap);
this.addSubCommand(this.cmdFactionsAdmin);
this.addSubCommand(this.cmdFactionsDisband);
this.addSubCommand(this.cmdFactionsPowerBoost);
this.addSubCommand(this.cmdFactionsSetpower);
this.addSubCommand(this.cmdFactionsVersion);
// Children
this.addChild(this.cmdFactionsList);
this.addChild(this.cmdFactionsFaction);
this.addChild(this.cmdFactionsPlayer);
this.addChild(this.cmdFactionsStatus);
this.addChild(this.cmdFactionsJoin);
this.addChild(this.cmdFactionsLeave);
this.addChild(this.cmdFactionsHome);
this.addChild(this.cmdFactionsMap);
this.addChild(this.cmdFactionsCreate);
this.addChild(this.cmdFactionsName);
this.addChild(this.cmdFactionsDescription);
this.addChild(this.cmdFactionsMotd);
this.addChild(this.cmdFactionsSethome);
this.addChild(this.cmdFactionsUnsethome);
this.addChild(this.cmdFactionsInvite);
this.addChild(this.cmdFactionsKick);
this.addChild(this.cmdFactionsTitle);
this.addChild(this.cmdFactionsRank);
this.addChild(this.cmdFactionsRankOldLeader);
this.addChild(this.cmdFactionsRankOldOfficer);
this.addChild(this.cmdFactionsRankOldPromote);
this.addChild(this.cmdFactionsRankOldDemote);
this.addChild(this.cmdFactionsMoney);
this.addChild(this.cmdFactionsSeeChunk);
this.addChild(this.cmdFactionsSeeChunkOld);
this.addChild(this.cmdFactionsTerritorytitles);
this.addChild(this.cmdFactionsClaim);
this.addChild(this.cmdFactionsUnclaim);
this.addChild(this.cmdFactionsAccess);
this.addChild(this.cmdFactionsRelationAlly);
this.addChild(this.cmdFactionsRelationTruce);
this.addChild(this.cmdFactionsRelationNeutral);
this.addChild(this.cmdFactionsRelationEnemy);
this.addChild(this.cmdFactionsPerm);
this.addChild(this.cmdFactionsFlag);
this.addChild(this.cmdFactionsUnstuck);
this.addChild(this.cmdFactionsExpansions);
this.addChild(this.cmdFactionsTax);
this.addChild(this.cmdFactionsDynmap);
this.addChild(this.cmdFactionsAdmin);
this.addChild(this.cmdFactionsDisband);
this.addChild(this.cmdFactionsPowerBoost);
this.addChild(this.cmdFactionsSetpower);
this.addChild(this.cmdFactionsVersion);
// Deprecated Commands
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFlag, "open"));
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who"));
this.addChild(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
this.addChild(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));
this.addChild(new DeprecatedCommand(this.cmdFactionsFlag, "open"));
this.addChild(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who"));
}
// -------------------------------------------- //

View File

@ -21,10 +21,10 @@ public class CmdFactionsAccess extends FactionsCommand
public CmdFactionsAccess()
{
// Add SubCommands
this.addSubCommand(this.cmdFactionsAccessView);
this.addSubCommand(this.cmdFactionsAccessPlayer);
this.addSubCommand(this.cmdFactionsAccessFaction);
// Children
this.addChild(this.cmdFactionsAccessView);
this.addChild(this.cmdFactionsAccessPlayer);
this.addChild(this.cmdFactionsAccessFaction);
// Aliases
this.addAliases("access");

View File

@ -1,13 +1,13 @@
package com.massivecraft.factions.cmd;
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.Faction;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
{
@ -20,9 +20,9 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
// Aliases
this.addAliases("f", "faction");
// Args
this.addArg(ARFaction.get(), "faction");
this.addArg(ARBoolean.get(), "yes/no", "toggle");
// Parameters
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeBoolean.get(), "yes/no", "toggle");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_FACTION.node));

View File

@ -1,13 +1,13 @@
package com.massivecraft.factions.cmd;
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.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
{
@ -20,9 +20,9 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
// Aliases
this.addAliases("p", "player");
// Args
this.addArg(ARMPlayer.get(), "player");
this.addArg(ARBoolean.get(), "yes/no", "toggle");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeBoolean.get(), "yes/no", "toggle");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.ACCESS_PLAYER.node));

View File

@ -3,8 +3,8 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
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.Txt;
@ -19,8 +19,8 @@ public class CmdFactionsAdmin extends FactionsCommand
// Aliases
this.addAliases("admin");
// Args
this.addArg(ARBoolean.get(), "on/off", "flip");
// Parameters
this.addParameter(TypeBoolean.get(), "on/off", "flip");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.ADMIN.node));

View File

@ -26,13 +26,13 @@ public class CmdFactionsClaim extends FactionsCommand
// Aliases
this.addAliases("claim");
// Add SubCommands
this.addSubCommand(this.cmdFactionsClaimOne);
this.addSubCommand(this.cmdFactionsClaimAuto);
this.addSubCommand(this.cmdFactionsClaimFill);
this.addSubCommand(this.cmdFactionsClaimSquare);
this.addSubCommand(this.cmdFactionsClaimCircle);
this.addSubCommand(this.cmdFactionsClaimAll);
// Children
this.addChild(this.cmdFactionsClaimOne);
this.addChild(this.cmdFactionsClaimAuto);
this.addChild(this.cmdFactionsClaimFill);
this.addChild(this.cmdFactionsClaimSquare);
this.addChild(this.cmdFactionsClaimCircle);
this.addChild(this.cmdFactionsClaimAll);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.CLAIM.node));

View File

@ -15,8 +15,8 @@ import com.massivecraft.factions.event.EventFactionsCreate;
import com.massivecraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeString;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.store.MStore;
@ -31,8 +31,8 @@ public class CmdFactionsCreate extends FactionsCommand
// Aliases
this.addAliases("create");
// Args
this.addArg(ARString.get(), "name");
// Parameters
this.addParameter(TypeString.get(), "name");
// Requirements
this.addRequirements(ReqHasntFaction.get());
@ -84,7 +84,7 @@ public class CmdFactionsCreate extends FactionsCommand
// Inform
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
if (MConf.get().logFactionCreate)

View File

@ -6,8 +6,8 @@ import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.event.EventFactionsDescriptionChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeString;
import com.massivecraft.massivecore.mixin.Mixin;
public class CmdFactionsDescription extends FactionsCommand
@ -21,8 +21,8 @@ public class CmdFactionsDescription extends FactionsCommand
// Aliases
this.addAliases("desc");
// Args
this.addArg(ARString.get(), "desc", true);
// Parameters
this.addParameter(TypeString.get(), "desc", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.DESCRIPTION.node));

View File

@ -1,6 +1,6 @@
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.MFlag;
import com.massivecraft.factions.entity.MPerm;
@ -28,8 +28,8 @@ public class CmdFactionsDisband extends FactionsCommand
// Aliases
this.addAliases("disband");
// Args
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.DISBAND.node));

View File

@ -5,7 +5,7 @@ import java.util.TreeSet;
import org.bukkit.Bukkit;
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.event.EventFactionsFactionShowAsync;
import com.massivecraft.factions.Factions;
@ -27,8 +27,8 @@ public class CmdFactionsFaction extends FactionsCommand
// Aliases
this.addAliases("f", "faction");
// Args
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.FACTION.node));

View File

@ -22,10 +22,10 @@ public class CmdFactionsFlag extends FactionsCommand
// Aliases
this.addAliases("flag");
// Subcommands
this.addSubCommand(this.cmdFactionsFlagList);
this.addSubCommand(this.cmdFactionsFlagShow);
this.addSubCommand(this.cmdFactionsFlagSet);
// Children
this.addChild(this.cmdFactionsFlagList);
this.addChild(this.cmdFactionsFlagShow);
this.addChild(this.cmdFactionsFlagSet);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.FLAG.node));

View File

@ -6,7 +6,7 @@ import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.MFlag;
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.util.Txt;
@ -21,8 +21,8 @@ public class CmdFactionsFlagList extends FactionsCommand
// Aliases
this.addAliases("l", "list");
// Args
this.addArg(ArgSetting.getPage());
// Parameters
this.addParameter(Parameter.getPage());
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.FLAG_LIST.node));

View File

@ -1,15 +1,15 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARMFlag;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMFlag;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.event.EventFactionsFlagChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
public class CmdFactionsFlagSet extends FactionsCommand
{
@ -22,10 +22,10 @@ public class CmdFactionsFlagSet extends FactionsCommand
// Aliases
this.addAliases("set");
// Args
this.addArg(ARMFlag.get(), "flag");
this.addArg(ARBoolean.get(), "yes/no");
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeMFlag.get(), "flag");
this.addParameter(TypeBoolean.get(), "yes/no");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.FLAG_SET.node));

View File

@ -5,14 +5,14 @@ import java.util.Collection;
import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARMFlag;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMFlag;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MFlag;
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.type.TypeAll;
import com.massivecraft.massivecore.cmd.type.TypeSet;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsFlagShow extends FactionsCommand
@ -26,9 +26,9 @@ public class CmdFactionsFlagShow extends FactionsCommand
// Aliases
this.addAliases("s", "show");
// Args
this.addArg(ARFaction.get(), "faction", "you");
this.addArg(ARAll.get(ARSet.get(ARMFlag.get(), false)), "flags", "all", true);
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeAll.get(TypeSet.get(TypeMFlag.get(), false)), "flags", "all", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.FLAG_SHOW.node));

View File

@ -7,7 +7,7 @@ import org.bukkit.entity.Player;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.MConf;
import com.massivecraft.factions.entity.MFlag;
@ -37,8 +37,8 @@ public class CmdFactionsHome extends FactionsCommandHome
// Aliases
this.addAliases("home");
// Args
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.HOME.node));
@ -73,7 +73,7 @@ public class CmdFactionsHome extends FactionsCommandHome
if (MPerm.getPermSethome().has(msender, faction, false))
{
msender.msg("<i>You should:");
msender.message(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getUseageTemplate());
msender.message(Factions.get().getOuterCmdFactions().cmdFactionsSethome.getTemplate());
}
return;

View File

@ -22,10 +22,10 @@ public class CmdFactionsInvite extends FactionsCommand
// Aliases
this.addAliases("i", "inv", "invite");
// Add SubCommands
this.addSubCommand(this.cmdFactionsInviteAdd);
this.addSubCommand(this.cmdFactionsInviteRemove);
this.addSubCommand(this.cmdFactionsInviteList);
// Children
this.addChild(this.cmdFactionsInviteAdd);
this.addChild(this.cmdFactionsInviteRemove);
this.addChild(this.cmdFactionsInviteList);
// Requirements

View File

@ -6,13 +6,13 @@ import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
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.MPlayer;
import com.massivecraft.factions.event.EventFactionsInvitedChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARSet;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeSet;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
@ -26,8 +26,8 @@ public class CmdFactionsInviteAdd extends FactionsCommand
// Aliases
this.addAliases("a", "add");
// Args
this.addArg(ARSet.get(ARMPlayer.get(), true), "players", true);
// Parameters
this.addParameter(TypeSet.get(TypeMPlayer.get(), true), "players", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.INVITE_ADD.node));

View File

@ -4,12 +4,12 @@ import java.util.List;
import com.massivecraft.factions.Perm;
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.MPerm;
import com.massivecraft.factions.entity.MPlayer;
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.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
@ -26,9 +26,9 @@ public class CmdFactionsInviteList extends FactionsCommand
// Aliases
this.addAliases("l", "list");
// Args
this.addArg(ArgSetting.getPage());
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(Parameter.getPage());
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.INVITE_LIST.node));

View File

@ -9,13 +9,13 @@ import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
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.MPlayer;
import com.massivecraft.factions.event.EventFactionsInvitedChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARSet;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeSet;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
@ -29,8 +29,8 @@ public class CmdFactionsInviteRemove extends FactionsCommand
// Aliases
this.addAliases("r", "remove");
// Args
this.addArg(ARSet.get(ARMPlayer.get(), true), "players/all", true);
// Parameters
this.addParameter(TypeSet.get(TypeMPlayer.get(), true), "players/all", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.INVITE_REMOVE.node));

View File

@ -4,8 +4,8 @@ import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARMPlayer;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.factions.entity.MPlayer;
@ -28,9 +28,9 @@ public class CmdFactionsJoin extends FactionsCommand
// Aliases
this.addAliases("join");
// Args
this.addArg(ARFaction.get(), "faction");
this.addArg(ARMPlayer.get(), "player", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeMPlayer.get(), "player", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.JOIN.node));

View File

@ -5,7 +5,7 @@ import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.MPerm;
import com.massivecraft.factions.entity.MPlayer;
@ -29,8 +29,8 @@ public class CmdFactionsKick extends FactionsCommand
// Aliases
this.addAliases("kick");
// Args
this.addArg(ARMPlayer.get(), "player");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.KICK.node));
@ -50,7 +50,7 @@ public class CmdFactionsKick extends FactionsCommand
if (msender == mplayer)
{
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;
}

View File

@ -10,7 +10,7 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
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.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
@ -27,8 +27,8 @@ public class CmdFactionsList extends FactionsCommand
// Aliases
this.addAliases("l", "list");
// Args
this.addArg(ArgSetting.getPage());
// Parameters
this.addParameter(Parameter.getPage());
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.LIST.node));

View File

@ -8,9 +8,9 @@ import com.massivecraft.factions.Const;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.BoardColl;
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.ReqIsPlayer;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
import com.massivecraft.massivecore.ps.PS;
public class CmdFactionsMap extends FactionsCommand
@ -24,8 +24,8 @@ public class CmdFactionsMap extends FactionsCommand
// Aliases
this.addAliases("map");
// Args
this.addArg(ARBoolean.get(), "on/off", "once");
// Parameters
this.addParameter(TypeBoolean.get(), "on/off", "once");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MAP.node));

View File

@ -23,13 +23,13 @@ public class CmdFactionsMoney extends FactionsCommand
public CmdFactionsMoney()
{
// Add SubCommands
this.addSubCommand(this.cmdMoneyBalance);
this.addSubCommand(this.cmdMoneyDeposit);
this.addSubCommand(this.cmdMoneyWithdraw);
this.addSubCommand(this.cmdMoneyTransferFf);
this.addSubCommand(this.cmdMoneyTransferFp);
this.addSubCommand(this.cmdMoneyTransferPf);
// Children
this.addChild(this.cmdMoneyBalance);
this.addChild(this.cmdMoneyDeposit);
this.addChild(this.cmdMoneyWithdraw);
this.addChild(this.cmdMoneyTransferFf);
this.addChild(this.cmdMoneyTransferFp);
this.addChild(this.cmdMoneyTransferPf);
// Aliases
this.addAliases("money");

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.Perm;
@ -19,8 +19,8 @@ public class CmdFactionsMoneyBalance extends FactionsCommand
// Aliases
this.addAliases("b", "balance");
// Args
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MONEY_BALANCE.node));

View File

@ -2,14 +2,14 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARFaction;
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.MConf;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
@ -26,9 +26,9 @@ public class CmdFactionsMoneyDeposit extends FactionsCommand
// Aliases
this.addAliases("d", "deposit");
// Args
this.addArg(ARDouble.get(), "amount");
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MONEY_DEPOSIT.node));

View File

@ -1,15 +1,15 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARFaction;
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.MConf;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
@ -27,10 +27,10 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand
// Aliases
this.addAliases("ff");
// Args
this.addArg(ARDouble.get(), "amount");
this.addArg(ARFaction.get(), "faction");
this.addArg(ARFaction.get(), "faction");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeFaction.get(), "faction");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2F.node));

View File

@ -1,17 +1,17 @@
package com.massivecraft.factions.cmd;
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.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
@ -29,10 +29,10 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand
// Aliases
this.addAliases("fp");
// Args
this.addArg(ARDouble.get(), "amount");
this.addArg(ARFaction.get(), "faction");
this.addArg(ARMPlayer.get(), "player");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeMPlayer.get(), "player");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MONEY_F2P.node));

View File

@ -1,17 +1,17 @@
package com.massivecraft.factions.cmd;
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.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
@ -29,10 +29,10 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand
// Aliases
this.addAliases("pf");
// Args
this.addArg(ARDouble.get(), "amount");
this.addArg(ARMPlayer.get(), "player");
this.addArg(ARFaction.get(), "faction");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeFaction.get(), "faction");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MONEY_P2F.node));

View File

@ -1,16 +1,16 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARFaction;
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.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
@ -28,9 +28,9 @@ public class CmdFactionsMoneyWithdraw extends FactionsCommand
// Aliases
this.addAliases("w", "withdraw");
// Args
this.addArg(ARDouble.get(), "amount");
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MONEY_WITHDRAW.node));

View File

@ -6,8 +6,8 @@ import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.event.EventFactionsMotdChange;
import com.massivecraft.massivecore.MassiveCore;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeString;
import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
@ -23,8 +23,8 @@ public class CmdFactionsMotd extends FactionsCommand
// Aliases
this.addAliases("motd");
// Args
this.addArg(ARString.get(), "new", "read", true);
// Parameters
this.addParameter(TypeString.get(), "new", "read", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.MOTD.node));

View File

@ -3,15 +3,15 @@ package com.massivecraft.factions.cmd;
import java.util.ArrayList;
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.FactionColl;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.event.EventFactionsNameChange;
import com.massivecraft.factions.util.MiscUtil;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeString;
public class CmdFactionsName extends FactionsCommand
{
@ -24,9 +24,9 @@ public class CmdFactionsName extends FactionsCommand
// Aliases
this.addAliases("name");
// Args
this.addArg(ARString.get(), "new name");
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeString.get(), "new name");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.NAME.node));

View File

@ -22,10 +22,10 @@ public class CmdFactionsPerm extends FactionsCommand
// Aliases
this.addAliases("perm");
// Subcommands
this.addSubCommand(this.cmdFactionsPermList);
this.addSubCommand(this.cmdFactionsPermShow);
this.addSubCommand(this.cmdFactionsPermSet);
// Children
this.addChild(this.cmdFactionsPermList);
this.addChild(this.cmdFactionsPermShow);
this.addChild(this.cmdFactionsPermSet);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.PERM.node));

View File

@ -6,7 +6,7 @@ import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.MPerm;
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.util.Txt;
@ -21,8 +21,8 @@ public class CmdFactionsPermList extends FactionsCommand
// Aliases
this.addAliases("l", "list");
// Args
this.addArg(ArgSetting.getPage());
// Parameters
this.addParameter(Parameter.getPage());
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.PERM_LIST.node));

View File

@ -5,15 +5,15 @@ import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARMPerm;
import com.massivecraft.factions.cmd.arg.ARRel;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPerm;
import com.massivecraft.factions.cmd.type.TypeRel;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsPermSet extends FactionsCommand
@ -27,11 +27,11 @@ public class CmdFactionsPermSet extends FactionsCommand
// Aliases
this.addAliases("set");
// Args
this.addArg(ARMPerm.get(), "perm");
this.addArg(ARRel.get(), "relation");
this.addArg(ARBoolean.get(), "yes/no");
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeMPerm.get(), "perm");
this.addParameter(TypeRel.get(), "relation");
this.addParameter(TypeBoolean.get(), "yes/no");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.PERM_SET.node));

View File

@ -5,14 +5,14 @@ import java.util.Collection;
import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARMPerm;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPerm;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MPerm;
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.type.TypeAll;
import com.massivecraft.massivecore.cmd.type.TypeSet;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsPermShow extends FactionsCommand
@ -26,9 +26,9 @@ public class CmdFactionsPermShow extends FactionsCommand
// Aliases
this.addAliases("s", "show");
// Args
this.addArg(ARFaction.get(), "faction", "you");
this.addArg(ARAll.get(ARSet.get(ARMPerm.get(), false)), "perms", "all", true);
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeAll.get(TypeSet.get(TypeMPerm.get(), false)), "perms", "all", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.PERM_SHOW.node));

View File

@ -4,7 +4,7 @@ import java.util.LinkedHashMap;
import java.util.Map.Entry;
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.MPlayer;
import com.massivecraft.factions.event.EventFactionsRemovePlayerMillis;
@ -26,8 +26,8 @@ public class CmdFactionsPlayer extends FactionsCommand
// Aliases
this.addAliases("p", "player");
// Args
this.addArg(ARMPlayer.get(), "player", "you");
// Parameters
this.addParameter(TypeMPlayer.get(), "player", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.PLAYER.node));

View File

@ -2,15 +2,15 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.arg.ARMPlayer;
import com.massivecraft.factions.cmd.arg.ARFaction;
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.Faction;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.ArgSetting;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.Parameter;
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
{
@ -18,8 +18,8 @@ public class CmdFactionsPowerBoost extends FactionsCommand
// FIELDS
// -------------------------------------------- //
private ArgSetting<MPlayer> settingMplayer = new ArgSetting<MPlayer>(ARMPlayer.get(), "name");
private ArgSetting<Faction> settingFaction = new ArgSetting<Faction>(ARFaction.get(), "name");
private Parameter<MPlayer> parameterMplayer = new Parameter<MPlayer>(TypeMPlayer.get(), "name");
private Parameter<Faction> parameterFaction = new Parameter<Faction>(TypeFaction.get(), "name");
// -------------------------------------------- //
// CONSTRUCT
@ -30,10 +30,10 @@ public class CmdFactionsPowerBoost extends FactionsCommand
// Aliases
this.addAliases("powerboost");
// Args
this.addArg(ARString.get(), "p|f|player|faction");
this.addArg(settingMplayer);
this.addArg(ARDouble.get(), "#");
// Parameters
this.addParameter(TypeString.get(), "p|f|player|faction");
this.addParameter(parameterMplayer);
this.addParameter(TypeDouble.get(), "#");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.POWERBOOST.node));
@ -65,7 +65,7 @@ public class CmdFactionsPowerBoost extends FactionsCommand
if (doPlayer)
{
this.getArgSettings().set(1, settingMplayer);
this.getParameters().set(1, parameterMplayer);
MPlayer targetPlayer = this.readArgAt(1);
targetPlayer.setPowerBoost(targetPower);
@ -73,7 +73,7 @@ public class CmdFactionsPowerBoost extends FactionsCommand
}
else
{
this.getArgSettings().set(1, settingFaction);
this.getParameters().set(1, parameterFaction);
Faction targetFaction = this.readArgAt(1);
targetFaction.setPowerBoost(targetPower);

View File

@ -6,9 +6,9 @@ import java.util.Set;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARMPlayer;
import com.massivecraft.factions.cmd.arg.ARRank;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.cmd.type.TypeRank;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MFlag;
@ -49,7 +49,7 @@ public class CmdFactionsRank extends FactionsCommand
private Rel rank = null;
// This one is permanent
private ARRank rankReader = new ARRank();
private TypeRank rankReader = new TypeRank();
// -------------------------------------------- //
// CONSTRUCT
@ -60,10 +60,10 @@ public class CmdFactionsRank extends FactionsCommand
// Aliases
this.addAliases("rank");
// Args
this.addArg(ARMPlayer.get(), "player");
this.addArg(rankReader, "action", "show");
this.addArg(ARFaction.get(), "faction", "their");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(rankReader, "action", "show");
this.addParameter(TypeFaction.get(), "faction", "their");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.RANK.node));
@ -113,11 +113,15 @@ public class CmdFactionsRank extends FactionsCommand
// This is always run after performing a MassiveCommand.
@Override
public void unsetSenderVars()
public void senderFields(boolean set)
{
super.senderFields(set);
if ( ! set)
{
super.unsetSenderVars();
this.unregisterFields();
}
}
// -------------------------------------------- //
// PRIVATE: REGISTER & UNREGISTER

View File

@ -1,9 +1,9 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARMPlayer;
import com.massivecraft.massivecore.cmd.VisibilityMode;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.massivecore.cmd.Visibility;
import com.massivecraft.massivecore.util.MUtil;
public class CmdFactionsRankOld extends FactionsCommand
@ -26,12 +26,12 @@ public class CmdFactionsRankOld extends FactionsCommand
// Aliases
this.addAliases(rankName);
// Args
this.addArg(ARMPlayer.get(), "player");
this.addArg(ARFaction.get(), "faction", "their");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeFaction.get(), "faction", "their");
// VisibilityMode
this.setVisibilityMode(VisibilityMode.INVISIBLE);
// Visibility
this.setVisibility(Visibility.INVISIBLE);
}
// -------------------------------------------- //

View File

@ -3,8 +3,8 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.arg.ARFaction;
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.MFlag;
import com.massivecraft.factions.entity.MPerm;
@ -26,7 +26,7 @@ public abstract class CmdFactionsRelationAbstract extends FactionsCommand
public CmdFactionsRelationAbstract()
{
// Aliases
this.addArg(ARFaction.get(), "faction");
this.addParameter(TypeFaction.get(), "faction");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.RELATION.node));

View File

@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
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.ReqIsPlayer;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsSeeChunk extends FactionsCommand
@ -18,8 +18,8 @@ public class CmdFactionsSeeChunk extends FactionsCommand
// Aliases
this.addAliases("sc", "seechunk");
// Args
this.addArg(ARBoolean.get(), "active", "toggle");
// Parameters
this.addParameter(TypeBoolean.get(), "active", "toggle");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.SEECHUNK.node));

View File

@ -4,7 +4,7 @@ import java.util.Collections;
import java.util.Set;
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.FactionColl;
import com.massivecraft.factions.entity.MPerm;
@ -36,10 +36,10 @@ public class CmdFactionsSetAuto extends FactionsCommand
// Aliases
this.addAliases("a", "auto");
// Args
// Parameters
if (claim)
{
this.addArg(ARFaction.get(), "faction", "you");
this.addParameter(TypeFaction.get(), "faction", "you");
}
// Requirements

View File

@ -1,9 +1,9 @@
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.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.type.TypeString;
public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
{
@ -16,12 +16,12 @@ public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
// Super
super(claim);
// Args
this.addArg(ARString.get(), "all|map");
this.addArg(ARFaction.get(), "faction");
// Parameters
this.addParameter(TypeString.get(), "all|map");
this.addParameter(TypeFaction.get(), "faction");
if (claim)
{
this.addArg(ARFaction.get(), "newfaction");
this.addParameter(TypeFaction.get(), "newfaction");
this.setFactionArgIndex(2);
}
}

View File

@ -1,9 +1,9 @@
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.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARInteger;
import com.massivecraft.massivecore.cmd.type.TypeInteger;
public abstract class CmdFactionsSetXRadius extends CmdFactionsSetX
@ -17,11 +17,11 @@ public abstract class CmdFactionsSetXRadius extends CmdFactionsSetX
// Super
super(claim);
// Args
this.addArg(1, ARInteger.get(), "radius");
// Parameters
this.addParameter(1, TypeInteger.get(), "radius");
if (claim)
{
this.addArg(ARFaction.get(), "faction", "you");
this.addParameter(TypeFaction.get(), "faction", "you");
this.setFactionArgIndex(1);
}
}

View File

@ -1,6 +1,6 @@
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
{
@ -13,10 +13,10 @@ public abstract class CmdFactionsSetXSimple extends CmdFactionsSetX
// Super
super(claim);
// Args
// Parameters
if (claim)
{
this.addArg(ARFaction.get(), "faction", "you");
this.addParameter(TypeFaction.get(), "faction", "you");
this.setFactionArgIndex(0);
}
}

View File

@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
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.MPerm;
import com.massivecraft.factions.event.EventFactionsHomeChange;
@ -22,8 +22,8 @@ public class CmdFactionsSethome extends FactionsCommandHome
// Aliases
this.addAliases("sethome");
// Args
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.SETHOME.node));
@ -63,7 +63,7 @@ public class CmdFactionsSethome extends FactionsCommandHome
// Inform
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)
{
msender.msg("<i>You have set the home for " + faction.getName(msender) + "<i>.");

View File

@ -1,13 +1,13 @@
package com.massivecraft.factions.cmd;
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.event.EventFactionsPowerChange;
import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARDouble;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeDouble;
public class CmdFactionsSetpower extends FactionsCommand
{
@ -20,9 +20,9 @@ public class CmdFactionsSetpower extends FactionsCommand
// Aliases
this.addAliases("sp", "setpower");
// Args
this.addArg(ARMPlayer.get(), "player");
this.addArg(ARDouble.get(), "power");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeDouble.get(), "power");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.SETPOWER.node));

View File

@ -7,13 +7,13 @@ import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.PlayerInactivityComparator;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.cmd.arg.ARSortMPlayer;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeSortMPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
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.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
@ -33,10 +33,10 @@ public class CmdFactionsStatus extends FactionsCommand
// Aliases
this.addAliases("s", "status");
// Args
this.addArg(ArgSetting.getPage());
this.addArg(ARFaction.get(), "faction", "you");
this.addArg(ARSortMPlayer.get(), "sort by", "time");
// Parameters
this.addParameter(Parameter.getPage());
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeSortMPlayer.get(), "sort by", "time");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.STATUS.node));

View File

@ -2,10 +2,10 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.VisibilityMode;
import com.massivecraft.massivecore.cmd.arg.ARBoolean;
import com.massivecraft.massivecore.cmd.Visibility;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.req.ReqTitlesAvailable;
import com.massivecraft.massivecore.cmd.type.TypeBoolean;
import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.util.Txt;
@ -20,8 +20,8 @@ public class CmdFactionsTerritorytitles extends FactionsCommand
// Aliases
this.addAliases("tt", "territorytitles");
// Args
this.addArg(ARBoolean.get(), "on|off", "toggle");
// Parameters
this.addParameter(TypeBoolean.get(), "on|off", "toggle");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.TERRITORYTITLES.node));
@ -33,11 +33,11 @@ public class CmdFactionsTerritorytitles extends FactionsCommand
// -------------------------------------------- //
@Override
public VisibilityMode getVisibilityMode()
public Visibility getVisibility()
{
// We hide the command if titles aren't available.
if ( ! Mixin.isTitlesAvailable()) return VisibilityMode.INVISIBLE;
return super.getVisibilityMode();
if ( ! Mixin.isTitlesAvailable()) return Visibility.INVISIBLE;
return super.getVisibility();
}
@Override

View File

@ -3,13 +3,13 @@ package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
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.MPlayer;
import com.massivecraft.factions.event.EventFactionsTitleChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.cmd.arg.ARString;
import com.massivecraft.massivecore.cmd.req.ReqHasPerm;
import com.massivecraft.massivecore.cmd.type.TypeString;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsTitle extends FactionsCommand
@ -23,9 +23,9 @@ public class CmdFactionsTitle extends FactionsCommand
// Aliases
this.addAliases("title");
// Args
this.addArg(ARMPlayer.get(), "player");
this.addArg(ARString.get(), "title", "", true);
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeString.get(), "title", "", true);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.TITLE.node));

View File

@ -26,13 +26,13 @@ public class CmdFactionsUnclaim extends FactionsCommand
// Aliases
this.addAliases("unclaim");
// Add SubCommands
this.addSubCommand(this.cmdFactionsUnclaimOne);
this.addSubCommand(this.cmdFactionsUnclaimAuto);
this.addSubCommand(this.cmdFactionsUnclaimFill);
this.addSubCommand(this.cmdFactionsUnclaimSquare);
this.addSubCommand(this.cmdFactionsUnclaimCircle);
this.addSubCommand(this.cmdFactionsUnclaimAll);
// Children
this.addChild(this.cmdFactionsUnclaimOne);
this.addChild(this.cmdFactionsUnclaimAuto);
this.addChild(this.cmdFactionsUnclaimFill);
this.addChild(this.cmdFactionsUnclaimSquare);
this.addChild(this.cmdFactionsUnclaimCircle);
this.addChild(this.cmdFactionsUnclaimAll);
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.UNCLAIM.node));

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
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.MPerm;
import com.massivecraft.factions.event.EventFactionsHomeChange;
@ -19,8 +19,8 @@ public class CmdFactionsUnsethome extends FactionsCommandHome
// Aliases
this.addAliases("unsethome");
// Args
this.addArg(ARFaction.get(), "faction", "you");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(ReqHasPerm.get(Perm.UNSETHOME.node));

View File

@ -23,8 +23,8 @@ public class CmdFactionsXPlaceholder extends FactionsCommand
// Desc
this.setDesc("Use " + extensionName);
// Args
this.setGivingErrorOnTooManyArgs(false);
// Parameters
this.setOverflowSensitive(false);
}
// -------------------------------------------- //

View File

@ -18,18 +18,10 @@ public class FactionsCommand extends MassiveCommand
// -------------------------------------------- //
@Override
public void fixSenderVars()
public void senderFields(boolean set)
{
this.msender = MPlayer.get(sender);
this.msenderFaction = this.msender.getFaction();
}
@Override
public void unsetSenderVars()
{
this.msender = null;
this.msenderFaction = null;
this.msender = set ? MPlayer.get(sender) : null;
this.msenderFaction = set ? this.msender.getFaction() : null;
}
}

View File

@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.req.ReqFactionHomesEnabled;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.cmd.VisibilityMode;
import com.massivecraft.massivecore.cmd.Visibility;
public class FactionsCommandHome extends FactionsCommand
{
@ -20,9 +20,9 @@ public class FactionsCommandHome extends FactionsCommand
// -------------------------------------------- //
@Override
public VisibilityMode getVisibilityMode()
public Visibility getVisibility()
{
return MConf.get().homesEnabled ? super.getVisibilityMode() : VisibilityMode.INVISIBLE;
return MConf.get().homesEnabled ? super.getVisibility() : Visibility.INVISIBLE;
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.arg;
package com.massivecraft.factions.cmd.type;
import java.util.Collection;
import java.util.Set;
@ -14,17 +14,17 @@ import com.massivecraft.factions.entity.MPlayerColl;
import com.massivecraft.massivecore.CaseInsensitiveComparator;
import com.massivecraft.massivecore.MassiveCore;
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;
public class ARFaction extends ARAbstract<Faction>
public class TypeFaction extends TypeAbstract<Faction>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static ARFaction i = new ARFaction();
public static ARFaction get() { return i; }
private static TypeFaction i = new TypeFaction();
public static TypeFaction get() { return i; }
// -------------------------------------------- //
// OVERRIDE

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.arg;
package com.massivecraft.factions.cmd.type;
import java.util.ArrayList;
import java.util.Collection;
@ -7,18 +7,18 @@ import java.util.List;
import org.bukkit.command.CommandSender;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
import com.massivecraft.massivecore.cmd.arg.ARAllAble;
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
import com.massivecraft.massivecore.cmd.type.TypeAllAble;
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
// -------------------------------------------- //
private static ARMFlag i = new ARMFlag();
public static ARMFlag get() { return i; }
private static TypeMFlag i = new TypeMFlag();
public static TypeMFlag get() { return i; }
// -------------------------------------------- //
// OVERRIDE

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.arg;
package com.massivecraft.factions.cmd.type;
import java.util.ArrayList;
import java.util.Collection;
@ -7,18 +7,18 @@ import java.util.List;
import org.bukkit.command.CommandSender;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.massivecore.cmd.arg.ARAbstractSelect;
import com.massivecraft.massivecore.cmd.arg.ARAllAble;
import com.massivecraft.massivecore.cmd.type.TypeAbstractSelect;
import com.massivecraft.massivecore.cmd.type.TypeAllAble;
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
// -------------------------------------------- //
private static ARMPerm i = new ARMPerm();
public static ARMPerm get() { return i; }
private static TypeMPerm i = new TypeMPerm();
public static TypeMPerm get() { return i; }
// -------------------------------------------- //
// OVERRIDE

View File

@ -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.MPlayerColl;
import com.massivecraft.massivecore.cmd.arg.AR;
import com.massivecraft.massivecore.cmd.type.Type;
public class ARMPlayer
public class TypeMPlayer
{
// -------------------------------------------- //
// INSTANCE
// -------------------------------------------- //
public static AR<MPlayer> get()
public static Type<MPlayer> get()
{
return MPlayerColl.get().getAREntity();
return MPlayerColl.get().getTypeEntity();
}
}

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.arg;
package com.massivecraft.factions.cmd.type;
import java.util.Collection;
import java.util.Collections;
@ -8,11 +8,11 @@ import org.bukkit.command.CommandSender;
import com.massivecraft.factions.Rel;
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.Txt;
public class ARRank extends ARAbstractSelect<Rel>
public class TypeRank extends TypeAbstractSelect<Rel>
{
// -------------------------------------------- //
// CONSTANTS
@ -32,18 +32,18 @@ public class ARRank extends ARAbstractSelect<Rel>
// -------------------------------------------- //
// Default constructor. Can't use promote and demote.
private static ARRank i = new ARRank();
public static ARRank get() { return i; }
private static TypeRank i = new TypeRank();
public static TypeRank get() { return i; }
public ARRank()
public TypeRank()
{
this.startRank = null;
}
// 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.isRank()) throw new IllegalArgumentException(rank + " is not a valid rank");

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.arg;
package com.massivecraft.factions.cmd.type;
import java.util.ArrayList;
import java.util.Collection;
@ -7,17 +7,17 @@ import java.util.List;
import org.bukkit.command.CommandSender;
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;
public class ARRel extends ARAbstractSelect<Rel>
public class TypeRel extends TypeAbstractSelect<Rel>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static ARRel i = new ARRel();
public static ARRel get() { return i; }
private static TypeRel i = new TypeRel();
public static TypeRel get() { return i; }
// -------------------------------------------- //
// OVERRIDE

View File

@ -1,4 +1,4 @@
package com.massivecraft.factions.cmd.arg;
package com.massivecraft.factions.cmd.type;
import java.util.Collection;
import java.util.Collections;
@ -11,10 +11,10 @@ import com.massivecraft.factions.PlayerInactivityComparator;
import com.massivecraft.factions.PlayerPowerComparator;
import com.massivecraft.factions.PlayerRoleComparator;
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;
public class ARSortMPlayer extends ARAbstractSelect<Comparator<MPlayer>>
public class TypeSortMPlayer extends TypeAbstractSelect<Comparator<MPlayer>>
{
// -------------------------------------------- //
// CONSTANTS
@ -26,8 +26,8 @@ public class ARSortMPlayer extends ARAbstractSelect<Comparator<MPlayer>>
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static ARSortMPlayer i = new ARSortMPlayer();
public static ARSortMPlayer get() { return i; }
private static TypeSortMPlayer i = new TypeSortMPlayer();
public static TypeSortMPlayer get() { return i; }
// -------------------------------------------- //
// OVERRIDE

View File

@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.massivecraft.factions.EconomyParticipator;
import com.massivecraft.factions.FactionEqualsPredictate;
import com.massivecraft.factions.FactionEqualsPredicate;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Lang;
import com.massivecraft.factions.Rel;
@ -1213,34 +1213,34 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
public boolean sendMessage(Object message)
{
return Mixin.messagePredictate(new FactionEqualsPredictate(this), message);
return Mixin.messagePredicate(new FactionEqualsPredicate(this), message);
}
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)
{
return Mixin.messagePredictate(new FactionEqualsPredictate(this), messages);
return Mixin.messagePredicate(new FactionEqualsPredicate(this), messages);
}
// CONVENIENCE 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)
{
return Mixin.msgPredictate(new FactionEqualsPredictate(this), msg, args);
return Mixin.msgPredicate(new FactionEqualsPredicate(this), msg, args);
}
public boolean msg(Collection<String> msgs)
{
return Mixin.msgPredictate(new FactionEqualsPredictate(this), msgs);
return Mixin.msgPredicate(new FactionEqualsPredicate(this), msgs);
}
}

View File

@ -3,7 +3,7 @@ package com.massivecraft.factions.entity;
import java.util.List;
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.PriorityComparator;
import com.massivecraft.massivecore.Registerable;
@ -63,7 +63,7 @@ public class MFlag extends Entity<MFlag> implements Prioritized, Registerable
{
setupStandardFlags();
new EventFactionsCreateFlags(isAsync).run();
return MFlagColl.get().getAll(PredictateIsRegistered.get(), PriorityComparator.get());
return MFlagColl.get().getAll(PredicateIsRegistered.get(), PriorityComparator.get());
}
public static void setupStandardFlags()

View File

@ -12,7 +12,7 @@ import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.TerritoryAccess;
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.PriorityComparator;
import com.massivecraft.massivecore.Registerable;
@ -98,7 +98,7 @@ public class MPerm extends Entity<MPerm> implements Prioritized, Registerable
setupStandardPerms();
new EventFactionsCreatePerms().run();
return MPermColl.get().getAll(PredictateIsRegistered.get(), PriorityComparator.get());
return MPermColl.get().getAll(PredicateIsRegistered.get(), PriorityComparator.get());
}
public static void setupStandardPerms()
@ -297,7 +297,7 @@ public class MPerm extends Entity<MPerm> implements Prioritized, Registerable
Player player = mplayer.getPlayer();
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;