2016-02-25 09:48:02 +01:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
2016-03-15 11:47:25 +01:00
|
|
|
import com.massivecraft.factions.entity.Faction;
|
|
|
|
import com.massivecraft.massivecore.MassiveException;
|
2016-02-25 09:48:02 +01:00
|
|
|
import com.massivecraft.massivecore.command.Visibility;
|
|
|
|
import com.massivecraft.massivecore.util.MUtil;
|
|
|
|
|
|
|
|
public class CmdFactionsRelationOld extends FactionsCommand
|
|
|
|
{
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// FIELDS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public final String relName;
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
public CmdFactionsRelationOld(String rel)
|
|
|
|
{
|
|
|
|
// Fields
|
|
|
|
this.relName = rel.toLowerCase();
|
|
|
|
|
|
|
|
// Aliases
|
|
|
|
this.addAliases(relName);
|
|
|
|
|
|
|
|
// Parameters
|
2016-03-15 11:47:25 +01:00
|
|
|
this.addParameter(TypeFaction.get(), "faction", true);
|
2016-02-25 09:48:02 +01:00
|
|
|
|
|
|
|
// Visibility
|
|
|
|
this.setVisibility(Visibility.INVISIBLE);
|
|
|
|
}
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// OVERRIDE
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
|
|
|
@Override
|
2016-03-15 11:47:25 +01:00
|
|
|
public void perform() throws MassiveException
|
2016-02-25 09:48:02 +01:00
|
|
|
{
|
2016-03-15 11:47:25 +01:00
|
|
|
// Arguments
|
|
|
|
Faction faction = this.readArg();
|
|
|
|
|
|
|
|
// Apply
|
|
|
|
CmdFactions.get().cmdFactionsRelation.cmdFactionsRelationSet.execute(sender, MUtil.list(
|
|
|
|
faction.getId(),
|
|
|
|
this.relName
|
|
|
|
));
|
2016-02-25 09:48:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|