Clean up commands

This commit is contained in:
Magnus Ulf Jørgensen 2017-02-10 16:38:36 +01:00
parent 46c02e33f4
commit 0ba52eae14
61 changed files with 70 additions and 409 deletions

View File

@ -15,6 +15,7 @@ permissions:
factions.access.player: {description: grant player access, with the proper fperm, default: false}
factions.access.view: {description: view access, default: false}
factions.override: {description: enable override mode, default: false}
factions.basecommand: {description: use factions base command, default: false}
factions.claim: {description: claim faction territory, default: false}
factions.claim.one: {description: claim a single chunk, default: false}
factions.claim.auto: {description: claim as you walk around, default: false}
@ -96,6 +97,7 @@ permissions:
factions.access.player: true
factions.access.view: true
factions.override: true
factions.basecommand: true
factions.claim: true
factions.claim.one: true
factions.claim.auto: true
@ -205,6 +207,7 @@ permissions:
factions.access.faction: true
factions.access.player: true
factions.access.view: true
factions.basecommand: true
factions.claim: true
factions.claim.one: true
factions.claim.auto: true

View File

@ -16,6 +16,7 @@ public enum Perm implements Identified
ACCESS_PLAYER,
ACCESS_FACTION,
OVERRIDE,
BASECOMMAND,
CLAIM,
CLAIM_ONE,
CLAIM_AUTO,

View File

@ -1,10 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
public class CmdFactionsAccess extends FactionsCommand
{
// -------------------------------------------- //
@ -25,13 +22,9 @@ public class CmdFactionsAccess extends FactionsCommand
this.addChild(this.cmdFactionsAccessView);
this.addChild(this.cmdFactionsAccessPlayer);
this.addChild(this.cmdFactionsAccessFaction);
// Aliases
this.addAliases("access");
// Requirements
this.addRequirements(RequirementIsPlayer.get());
this.addRequirements(RequirementHasPerm.get(Perm.ACCESS));
}
}

View File

@ -1,12 +1,10 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
@ -17,15 +15,9 @@ public class CmdFactionsAccessFaction extends CmdFactionsAccessAbstract
public CmdFactionsAccessFaction()
{
// Aliases
this.addAliases("faction");
// Parameters
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeBooleanYes.get(), "yes/no", "toggle");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_FACTION));
}
// -------------------------------------------- //

View File

@ -1,12 +1,10 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
@ -17,15 +15,9 @@ public class CmdFactionsAccessPlayer extends CmdFactionsAccessAbstract
public CmdFactionsAccessPlayer()
{
// Aliases
this.addAliases("player");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeBooleanYes.get(), "yes/no", "toggle");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_PLAYER));
}
// -------------------------------------------- //

View File

@ -1,8 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsAccessView extends CmdFactionsAccessAbstract
{
// -------------------------------------------- //
@ -11,11 +8,7 @@ public class CmdFactionsAccessView extends CmdFactionsAccessAbstract
public CmdFactionsAccessView()
{
// Aliases
this.addAliases("view");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.ACCESS_VIEW));
}
// -------------------------------------------- //

View File

@ -1,9 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsClaim extends FactionsCommand
{
// -------------------------------------------- //
@ -23,9 +19,6 @@ public class CmdFactionsClaim extends FactionsCommand
public CmdFactionsClaim()
{
// Aliases
this.addAliases("claim");
// Children
this.addChild(this.cmdFactionsClaimOne);
this.addChild(this.cmdFactionsClaimAuto);
@ -33,9 +26,6 @@ public class CmdFactionsClaim extends FactionsCommand
this.addChild(this.cmdFactionsClaimSquare);
this.addChild(this.cmdFactionsClaimCircle);
this.addChild(this.cmdFactionsClaimAll);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.CLAIM));
}
}

View File

@ -5,7 +5,6 @@ import java.util.ArrayList;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.req.ReqHasntFaction;
import com.massivecraft.factions.entity.Faction;
@ -15,7 +14,6 @@ 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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.store.MStore;
@ -29,14 +27,13 @@ public class CmdFactionsCreate extends FactionsCommand
public CmdFactionsCreate()
{
// Aliases
this.addAliases("create", "new");
this.addAliases("new");
// Parameters
this.addParameter(TypeString.get(), "name");
// Requirements
this.addRequirements(ReqHasntFaction.get());
this.addRequirements(RequirementHasPerm.get(Perm.CREATE));
}
// -------------------------------------------- //

View File

@ -1,12 +1,10 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.req.ReqHasFaction;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.mixin.MixinDisplayName;
@ -18,14 +16,10 @@ public class CmdFactionsDescription extends FactionsCommand
public CmdFactionsDescription()
{
// Aliases
this.addAliases("description");
// Parameters
this.addParameter(TypeString.get(), "desc", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.DESCRIPTION));
this.addRequirements(ReqHasFaction.get());
}

View File

@ -1,19 +1,17 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.event.EventFactionsDisband;
import com.massivecraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
@ -25,14 +23,8 @@ public class CmdFactionsDisband extends FactionsCommand
public CmdFactionsDisband()
{
// Aliases
this.addAliases("disband");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.DISBAND));
}
// -------------------------------------------- //

View File

@ -3,8 +3,6 @@ package com.massivecraft.factions.cmd;
import java.util.Map.Entry;
import com.massivecraft.factions.event.EventFactionsExpansions;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsExpansions extends FactionsCommand
@ -15,11 +13,7 @@ public class CmdFactionsExpansions extends FactionsCommand
public CmdFactionsExpansions()
{
// Aliases
this.addAliases("expansions");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.EXPANSIONS));
}
// -------------------------------------------- //

View File

@ -5,14 +5,12 @@ import java.util.TreeSet;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.event.EventFactionsFactionShowAsync;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.PriorityLines;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.mixin.MixinMessage;
import com.massivecraft.massivecore.util.Txt;
@ -25,13 +23,10 @@ public class CmdFactionsFaction extends FactionsCommand
public CmdFactionsFaction()
{
// Aliases
this.addAliases("f", "faction", "show", "who");
this.addAliases("f", "show", "who");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.FACTION));
}
// -------------------------------------------- //

View File

@ -1,8 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsFlag extends FactionsCommand
{
// -------------------------------------------- //
@ -19,16 +16,10 @@ public class CmdFactionsFlag extends FactionsCommand
public CmdFactionsFlag()
{
// Aliases
this.addAliases("flag");
// Children
this.addChild(this.cmdFactionsFlagList);
this.addChild(this.cmdFactionsFlagShow);
this.addChild(this.cmdFactionsFlagSet);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.FLAG));
}
}

View File

@ -3,11 +3,9 @@ package com.massivecraft.factions.cmd;
import java.util.ArrayList;
import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsFlagList extends FactionsCommand
@ -18,14 +16,8 @@ public class CmdFactionsFlagList extends FactionsCommand
public CmdFactionsFlagList()
{
// Aliases
this.addAliases("list");
// Parameters
this.addParameter(Parameter.getPage());
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.FLAG_LIST));
}
// -------------------------------------------- //

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMFlag;
import com.massivecraft.factions.entity.Faction;
@ -8,7 +7,6 @@ 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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
public class CmdFactionsFlagSet extends FactionsCommand
@ -19,16 +17,10 @@ public class CmdFactionsFlagSet extends FactionsCommand
public CmdFactionsFlagSet()
{
// Aliases
this.addAliases("set");
// Parameters
this.addParameter(TypeMFlag.get(), "flag");
this.addParameter(TypeBooleanYes.get(), "yes/no");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SET));
}
// -------------------------------------------- //

View File

@ -4,13 +4,11 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.util.Txt;
@ -22,15 +20,9 @@ public class CmdFactionsFlagShow extends FactionsCommand
public CmdFactionsFlagShow()
{
// Aliases
this.addAliases("show");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeSet.get(TypeMFlag.get()), "flags", "all", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.FLAG_SHOW));
}
// -------------------------------------------- //

View File

@ -4,18 +4,16 @@ import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.BoardColl;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.event.EventFactionsHomeTeleport;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.mixin.MixinTeleport;
import com.massivecraft.massivecore.mixin.TeleporterException;
@ -24,7 +22,6 @@ import com.massivecraft.massivecore.teleport.Destination;
import com.massivecraft.massivecore.teleport.DestinationSimple;
import com.massivecraft.massivecore.util.MUtil;
public class CmdFactionsHome extends FactionsCommandHome
{
// -------------------------------------------- //
@ -33,14 +30,10 @@ public class CmdFactionsHome extends FactionsCommandHome
public CmdFactionsHome()
{
// Aliases
this.addAliases("home");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.HOME));
this.addRequirements(RequirementIsPlayer.get());
}

View File

@ -1,8 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsInvite extends FactionsCommand
{
// -------------------------------------------- //
@ -19,17 +16,10 @@ public class CmdFactionsInvite extends FactionsCommand
public CmdFactionsInvite()
{
// Aliases
this.addAliases("invite");
// Children
this.addChild(this.cmdFactionsInviteAdd);
this.addChild(this.cmdFactionsInviteRemove);
this.addChild(this.cmdFactionsInviteList);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.INVITE));
}
}

View File

@ -4,13 +4,11 @@ import java.util.Collection;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
@ -22,14 +20,8 @@ public class CmdFactionsInviteAdd extends FactionsCommand
// -------------------------------------------- //
public CmdFactionsInviteAdd()
{
// Aliases
this.addAliases("add");
// Parameters
this.addParameter(TypeSet.get(TypeMPlayer.get()), "players", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.INVITE_ADD));
}
// -------------------------------------------- //

View File

@ -10,7 +10,6 @@ import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.Txt;
@ -23,15 +22,9 @@ public class CmdFactionsInviteList extends FactionsCommand
public CmdFactionsInviteList()
{
// Aliases
this.addAliases("list");
// Parameters
this.addParameter(Parameter.getPage());
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.INVITE_LIST));
}
// -------------------------------------------- //

View File

@ -7,13 +7,11 @@ import java.util.Set;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
@ -25,14 +23,8 @@ public class CmdFactionsInviteRemove extends FactionsCommand
// -------------------------------------------- //
public CmdFactionsInviteRemove()
{
// Aliases
this.addAliases("remove");
// Parameters
this.addParameter(TypeSet.get(TypeMPlayer.get()), "players/all", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.INVITE_REMOVE));
}
// -------------------------------------------- //

View File

@ -6,14 +6,13 @@ import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.mson.Mson;
import com.massivecraft.massivecore.util.Txt;
@ -25,15 +24,9 @@ public class CmdFactionsJoin extends FactionsCommand
public CmdFactionsJoin()
{
// Aliases
this.addAliases("join");
// Parameters
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeMPlayer.get(), "player", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.JOIN));
}
// -------------------------------------------- //

View File

@ -3,7 +3,6 @@ package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.factions.entity.Faction;
@ -14,7 +13,6 @@ import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.IdUtil;
public class CmdFactionsKick extends FactionsCommand
@ -25,14 +23,8 @@ public class CmdFactionsKick extends FactionsCommand
public CmdFactionsKick()
{
// Aliases
this.addAliases("kick");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.KICK));
}
// -------------------------------------------- //

View File

@ -1,8 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.req.ReqHasFaction;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsLeave extends FactionsCommand
{
@ -12,11 +10,7 @@ public class CmdFactionsLeave extends FactionsCommand
public CmdFactionsLeave()
{
// Aliases
this.addAliases("leave");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.LEAVE));
this.addRequirements(ReqHasFaction.get());
}

View File

@ -7,13 +7,11 @@ import org.bukkit.command.CommandSender;
import com.massivecraft.factions.FactionListComparator;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.Txt;
@ -26,14 +24,8 @@ public class CmdFactionsList extends FactionsCommand
public CmdFactionsList()
{
// Aliases
this.addAliases("l", "list");
// Parameters
this.addParameter(Parameter.getPage());
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.LIST));
}
// -------------------------------------------- //

View File

@ -5,10 +5,8 @@ import java.util.List;
import org.bukkit.Location;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.ps.PS;
@ -21,14 +19,10 @@ public class CmdFactionsMap extends FactionsCommand
public CmdFactionsMap()
{
// Aliases
this.addAliases("map");
// Parameters
this.addParameter(TypeBooleanYes.get(), "on/off", "once");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.MAP));
this.addRequirements(RequirementIsPlayer.get());
}

View File

@ -1,8 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsMoney extends FactionsCommand
{
@ -30,13 +28,9 @@ public class CmdFactionsMoney extends FactionsCommand
this.addChild(this.cmdMoneyTransferFf);
this.addChild(this.cmdMoneyTransferFp);
this.addChild(this.cmdMoneyTransferPf);
// Aliases
this.addAliases("money");
// Requirements
this.addRequirements(ReqBankCommandsEnabled.get());
this.addRequirements(RequirementHasPerm.get(Perm.MONEY));
}
}

View File

@ -1,12 +1,11 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
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;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsMoneyBalance extends FactionsCommand
{
@ -16,14 +15,10 @@ public class CmdFactionsMoneyBalance extends FactionsCommand
public CmdFactionsMoneyBalance()
{
// Aliases
this.addAliases("balance");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.MONEY_BALANCE));
this.addRequirements(ReqBankCommandsEnabled.get());
}

View File

@ -1,20 +1,18 @@
package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyDeposit extends FactionsCommand
{
// -------------------------------------------- //
@ -23,15 +21,11 @@ public class CmdFactionsMoneyDeposit extends FactionsCommand
public CmdFactionsMoneyDeposit()
{
// Aliases
this.addAliases("deposit");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.MONEY_DEPOSIT));
this.addRequirements(ReqBankCommandsEnabled.get());
}

View File

@ -1,11 +1,13 @@
package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
@ -13,9 +15,6 @@ import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferFf extends FactionsCommand
{
// -------------------------------------------- //
@ -24,6 +23,9 @@ public class CmdFactionsMoneyTransferFf extends FactionsCommand
public CmdFactionsMoneyTransferFf()
{
// Fields
this.setSetupEnabled(false);
// Aliases
this.addAliases("ff");

View File

@ -1,13 +1,15 @@
package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.entity.MPlayer;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
@ -15,9 +17,6 @@ import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferFp extends FactionsCommand
{
// -------------------------------------------- //
@ -26,6 +25,9 @@ public class CmdFactionsMoneyTransferFp extends FactionsCommand
public CmdFactionsMoneyTransferFp()
{
// Fields
this.setSetupEnabled(false);
// Aliases
this.addAliases("fp");

View File

@ -1,13 +1,15 @@
package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.entity.MPlayer;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
@ -15,9 +17,6 @@ import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
public class CmdFactionsMoneyTransferPf extends FactionsCommand
{
// -------------------------------------------- //
@ -26,6 +25,9 @@ public class CmdFactionsMoneyTransferPf extends FactionsCommand
public CmdFactionsMoneyTransferPf()
{
// Fields
this.setSetupEnabled(false);
// Aliases
this.addAliases("pf");

View File

@ -1,21 +1,18 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Factions;
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.entity.MPlayer;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.money.Money;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsMoneyWithdraw extends FactionsCommand
{
@ -25,15 +22,11 @@ public class CmdFactionsMoneyWithdraw extends FactionsCommand
public CmdFactionsMoneyWithdraw()
{
// Aliases
this.addAliases("withdraw");
// Parameters
this.addParameter(TypeDouble.get(), "amount");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.MONEY_WITHDRAW));
this.addRequirements(ReqBankCommandsEnabled.get());
}

View File

@ -1,12 +1,10 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.MPerm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.mixin.MixinDisplayName;
import com.massivecraft.massivecore.util.MUtil;
@ -20,14 +18,8 @@ public class CmdFactionsMotd extends FactionsCommand
public CmdFactionsMotd()
{
// Aliases
this.addAliases("motd");
// Parameters
this.addParameter(TypeString.get(), "new", "read", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.MOTD));
}
// -------------------------------------------- //

View File

@ -2,7 +2,6 @@ package com.massivecraft.factions.cmd;
import java.util.ArrayList;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
@ -10,7 +9,6 @@ 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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
public class CmdFactionsName extends FactionsCommand
@ -21,15 +19,9 @@ public class CmdFactionsName extends FactionsCommand
public CmdFactionsName()
{
// Aliases
this.addAliases("name");
// Parameters
this.addParameter(TypeString.get(), "new name");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.NAME));
}
// -------------------------------------------- //

View File

@ -1,9 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt;
@ -17,13 +15,10 @@ public class CmdFactionsOverride extends FactionsCommand
public CmdFactionsOverride()
{
// Aliases
this.addAliases("override", "admin");
this.addAliases("admin");
// Parameters
this.addParameter(TypeBooleanYes.get(), "on/off", "flip");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.OVERRIDE));
}
// -------------------------------------------- //

View File

@ -1,8 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsPerm extends FactionsCommand
{
// -------------------------------------------- //
@ -19,16 +16,10 @@ public class CmdFactionsPerm extends FactionsCommand
public CmdFactionsPerm()
{
// Aliases
this.addAliases("perm");
// Children
this.addChild(this.cmdFactionsPermList);
this.addChild(this.cmdFactionsPermShow);
this.addChild(this.cmdFactionsPermSet);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.PERM));
}
}

View File

@ -3,11 +3,9 @@ package com.massivecraft.factions.cmd;
import java.util.ArrayList;
import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsPermList extends FactionsCommand
@ -18,14 +16,8 @@ public class CmdFactionsPermList extends FactionsCommand
public CmdFactionsPermList()
{
// Aliases
this.addAliases("list");
// Parameters
this.addParameter(Parameter.getPage());
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.PERM_LIST));
}
// -------------------------------------------- //

View File

@ -3,7 +3,6 @@ package com.massivecraft.factions.cmd;
import java.util.ArrayList;
import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeMPerm;
@ -13,7 +12,6 @@ import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.event.EventFactionsPermChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanYes;
import com.massivecraft.massivecore.util.Txt;
@ -25,17 +23,11 @@ public class CmdFactionsPermSet extends FactionsCommand
public CmdFactionsPermSet()
{
// Aliases
this.addAliases("set");
// Parameters
this.addParameter(TypeMPerm.get(), "perm");
this.addParameter(TypeRel.get(), "relation");
this.addParameter(TypeBooleanYes.get(), "yes/no");
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.PERM_SET));
}
// -------------------------------------------- //

View File

@ -4,13 +4,11 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.massivecraft.factions.Perm;
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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.util.Txt;
@ -22,15 +20,9 @@ public class CmdFactionsPermShow extends FactionsCommand
public CmdFactionsPermShow()
{
// Aliases
this.addAliases("show");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeSet.get(TypeMPerm.get()), "perms", "all", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.PERM_SHOW));
}
// -------------------------------------------- //

View File

@ -3,14 +3,12 @@ package com.massivecraft.factions.cmd;
import java.util.LinkedHashMap;
import java.util.Map.Entry;
import com.massivecraft.factions.Perm;
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;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.Progressbar;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.TimeDiffUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import com.massivecraft.massivecore.util.Txt;
@ -23,14 +21,8 @@ public class CmdFactionsPlayer extends FactionsCommand
public CmdFactionsPlayer()
{
// Aliases
this.addAliases("p", "player");
// Parameters
this.addParameter(TypeMPlayer.get(), "player", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.PLAYER));
}
// -------------------------------------------- //
@ -111,4 +103,4 @@ public class CmdFactionsPlayer extends FactionsCommand
return TimeDiffUtil.formatedVerboose(unitcounts);
}
}
}

View File

@ -1,14 +1,12 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
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.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeDouble;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
@ -27,16 +25,10 @@ public class CmdFactionsPowerBoost extends FactionsCommand
public CmdFactionsPowerBoost()
{
// Aliases
this.addAliases("powerboost");
// Parameters
this.addParameter(TypeString.get(), "p|f|player|faction");
this.addParameter(parameterMplayer);
this.addParameter(TypeDouble.get(), "#");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.POWERBOOST));
}
// -------------------------------------------- //

View File

@ -18,7 +18,6 @@ import com.massivecraft.factions.event.EventFactionsMembershipChange;
import com.massivecraft.factions.event.EventFactionsMembershipChange.MembershipChangeReason;
import com.massivecraft.factions.event.EventFactionsRankChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsRank extends FactionsCommand
@ -54,16 +53,10 @@ public class CmdFactionsRank extends FactionsCommand
public CmdFactionsRank()
{
// Aliases
this.addAliases("rank");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeRank.get(), "action", "show");
this.addParameter(TypeFaction.get(), "faction", "their");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.RANK));
}
// -------------------------------------------- //

View File

@ -21,6 +21,7 @@ public class CmdFactionsRankOld extends FactionsCommand
{
// Fields
this.rankName = rank.toLowerCase();
this.setSetupEnabled(false);
// Aliases
this.addAliases(rankName);

View File

@ -1,9 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsRelation extends FactionsCommand
{
// -------------------------------------------- //
@ -24,12 +20,6 @@ public class CmdFactionsRelation extends FactionsCommand
this.addChild(this.cmdFactionsRelationSet);
this.addChild(this.cmdFactionsRelationList);
this.addChild(this.cmdFactionsRelationWishes);
// Aliases
this.addAliases("relation");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.RELATION));
}
}

View File

@ -7,18 +7,15 @@ import java.util.Set;
import org.bukkit.Bukkit;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeRelation;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveList;
import com.massivecraft.massivecore.collections.MassiveSet;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.container.TypeSet;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
@ -39,16 +36,10 @@ public class CmdFactionsRelationList extends FactionsCommand
public CmdFactionsRelationList()
{
// Aliases
this.addAliases("list");
// Parameter
this.addParameter(Parameter.getPage());
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeSet.get(TypeRelation.get()), "relations", "all");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.RELATION_LIST));
}
// -------------------------------------------- //

View File

@ -22,6 +22,7 @@ public class CmdFactionsRelationOld extends FactionsCommand
{
// Fields
this.relName = rel.toLowerCase();
this.setSetupEnabled(false);
// Aliases
this.addAliases(relName);

View File

@ -2,7 +2,6 @@ package com.massivecraft.factions.cmd;
import org.bukkit.ChatColor;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeRelation;
@ -10,10 +9,8 @@ import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MFlag;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.event.EventFactionsRelationChange;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.MassiveCommand;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.mson.Mson;
public class CmdFactionsRelationSet extends FactionsCommand
@ -24,15 +21,9 @@ public class CmdFactionsRelationSet extends FactionsCommand
public CmdFactionsRelationSet()
{
// Aliases
this.addAliases("set");
// Parameter
this.addParameter(TypeFaction.get(), "faction");
this.addParameter(TypeRelation.get(), "relation");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.RELATION_SET));
}
// -------------------------------------------- //

View File

@ -6,16 +6,13 @@ import java.util.Map.Entry;
import org.bukkit.Bukkit;
import com.massivecraft.factions.Factions;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.collections.MassiveMap;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.MUtil;
@ -29,15 +26,9 @@ public class CmdFactionsRelationWishes extends FactionsCommand
public CmdFactionsRelationWishes()
{
// Aliases
this.addAliases("wishes");
// Parameter
this.addParameter(Parameter.getPage());
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.RELATION_WISHES));
}
// -------------------------------------------- //

View File

@ -1,8 +1,6 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanOn;
import com.massivecraft.massivecore.util.Txt;
@ -16,13 +14,12 @@ public class CmdFactionsSeeChunk extends FactionsCommand
public CmdFactionsSeeChunk()
{
// Aliases
this.addAliases("sc", "seechunk");
this.addAliases("sc");
// Parameters
this.addParameter(TypeBooleanOn.get(), "active", "toggle");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNK));
this.addRequirements(RequirementIsPlayer.get());
}

View File

@ -5,9 +5,7 @@ import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.entity.Player;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.util.VisualizeUtil;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.ps.PSFormatHumanSpace;
@ -21,10 +19,9 @@ public class CmdFactionsSeeChunkOld extends FactionsCommand
public CmdFactionsSeeChunkOld()
{
// Aliases
this.addAliases("sco", "seechunkold");
this.addAliases("sco");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.SEECHUNKOLD));
this.addRequirements(RequirementIsPlayer.get());
}

View File

@ -32,6 +32,7 @@ public class CmdFactionsSetAuto extends FactionsCommand
{
// Fields
this.setClaim(claim);
this.setSetupEnabled(false);
// Aliases
this.addAliases("auto");

View File

@ -36,6 +36,7 @@ public abstract class CmdFactionsSetX extends FactionsCommand
public CmdFactionsSetX(boolean claim)
{
this.setClaim(claim);
this.setSetupEnabled(false);
}
// -------------------------------------------- //

View File

@ -5,7 +5,6 @@ import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.PlayerInactivityComparator;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.cmd.type.TypeSortMPlayer;
@ -14,14 +13,12 @@ import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Parameter;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.pager.Pager;
import com.massivecraft.massivecore.pager.Stringifier;
import com.massivecraft.massivecore.util.TimeDiffUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import com.massivecraft.massivecore.util.Txt;
public class CmdFactionsStatus extends FactionsCommand
{
// -------------------------------------------- //
@ -30,16 +27,10 @@ public class CmdFactionsStatus extends FactionsCommand
public CmdFactionsStatus()
{
// Aliases
this.addAliases("s", "status");
// Parameters
this.addParameter(Parameter.getPage());
this.addParameter(TypeFaction.get(), "faction", "you");
this.addParameter(TypeSortMPlayer.get(), "sort", "time");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.STATUS));
}
// -------------------------------------------- //

View File

@ -1,9 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementTitlesAvailable;
import com.massivecraft.massivecore.command.type.primitive.TypeBooleanOn;
import com.massivecraft.massivecore.mixin.MixinTitle;
@ -18,13 +16,12 @@ public class CmdFactionsTerritorytitles extends FactionsCommand
public CmdFactionsTerritorytitles()
{
// Aliases
this.addAliases("tt", "territorytitles");
this.addAliases("tt");
// Parameters
this.addParameter(TypeBooleanOn.get(), "on|off", "toggle");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.TERRITORYTITLES));
this.addRequirements(RequirementTitlesAvailable.get());
}

View File

@ -8,7 +8,6 @@ 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.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.type.primitive.TypeString;
import com.massivecraft.massivecore.util.Txt;
@ -20,15 +19,9 @@ public class CmdFactionsTitle extends FactionsCommand
public CmdFactionsTitle()
{
// Aliases
this.addAliases("title");
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
this.addParameter(TypeString.get(), "title", "", true);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.TITLE));
}
// -------------------------------------------- //

View File

@ -1,9 +1,5 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsUnclaim extends FactionsCommand
{
// -------------------------------------------- //
@ -23,9 +19,6 @@ public class CmdFactionsUnclaim extends FactionsCommand
public CmdFactionsUnclaim()
{
// Aliases
this.addAliases("unclaim");
// Children
this.addChild(this.cmdFactionsUnclaimOne);
this.addChild(this.cmdFactionsUnclaimAuto);
@ -33,9 +26,6 @@ public class CmdFactionsUnclaim extends FactionsCommand
this.addChild(this.cmdFactionsUnclaimSquare);
this.addChild(this.cmdFactionsUnclaimCircle);
this.addChild(this.cmdFactionsUnclaimAll);
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.UNCLAIM));
}
}

View File

@ -1,12 +1,10 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
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;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
public class CmdFactionsUnsethome extends FactionsCommandHome
{
@ -16,14 +14,8 @@ public class CmdFactionsUnsethome extends FactionsCommandHome
public CmdFactionsUnsethome()
{
// Aliases
this.addAliases("unsethome");
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.UNSETHOME));
}
// -------------------------------------------- //

View File

@ -6,7 +6,6 @@ import java.util.List;
import org.bukkit.Location;
import org.bukkit.World;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.entity.BoardColl;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.FactionColl;
@ -14,7 +13,6 @@ import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MPerm;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.requirement.RequirementHasPerm;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.mixin.MixinTeleport;
import com.massivecraft.massivecore.mixin.TeleporterException;
@ -30,11 +28,7 @@ public class CmdFactionsUnstuck extends FactionsCommand
public CmdFactionsUnstuck()
{
// Aliases
this.addAliases("unstuck");
// Requirements
this.addRequirements(RequirementHasPerm.get(Perm.UNSTUCK));
this.addRequirements(RequirementIsPlayer.get());
}

View File

@ -16,6 +16,7 @@ public class CmdFactionsXPlaceholder extends FactionsCommand
{
// Fields
this.extensionName = extensionName;
this.setSetupEnabled(false);
// Aliases
this.addAliases(aliases);

View File

@ -1,7 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.massivecore.command.MassiveCommand;
public class FactionsCommand extends MassiveCommand
@ -12,7 +12,16 @@ public class FactionsCommand extends MassiveCommand
public MPlayer msender;
public Faction msenderFaction;
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public FactionsCommand()
{
this.setSetupEnabled(true);
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@ -23,5 +32,5 @@ public class FactionsCommand extends MassiveCommand
this.msender = set ? MPlayer.get(sender) : null;
this.msenderFaction = set ? this.msender.getFaction() : null;
}
}