2014-10-13 15:14:34 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2015-10-21 19:35:41 +02:00
|
|
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
2014-10-13 15:14:34 +02:00
|
|
|
import com.massivecraft.factions.entity.Faction;
|
2015-02-12 12:00:55 +01:00
|
|
|
import com.massivecraft.massivecore.MassiveException;
|
2015-11-06 02:10:29 +01:00
|
|
|
import com.massivecraft.massivecore.command.type.primitive.TypeString;
|
2014-10-13 15:14:34 +02:00
|
|
|
|
2014-11-19 10:30:44 +01:00
|
|
|
public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
|
2014-10-13 15:14:34 +02:00
|
|
|
{
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// CONSTRUCT
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2014-11-19 10:30:44 +01:00
|
|
|
public CmdFactionsSetXAll(boolean claim)
|
2014-10-13 15:14:34 +02:00
|
|
|
{
|
2014-11-19 10:30:44 +01:00
|
|
|
// Super
|
|
|
|
super(claim);
|
|
|
|
|
2015-10-21 19:35:41 +02:00
|
|
|
// Parameters
|
|
|
|
this.addParameter(TypeString.get(), "all|map");
|
|
|
|
this.addParameter(TypeFaction.get(), "faction");
|
2014-11-19 10:30:44 +01:00
|
|
|
if (claim)
|
|
|
|
{
|
2015-10-21 19:35:41 +02:00
|
|
|
this.addParameter(TypeFaction.get(), "newfaction");
|
2014-11-19 10:30:44 +01:00
|
|
|
this.setFactionArgIndex(2);
|
|
|
|
}
|
2014-10-13 15:14:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// -------------------------------------------- //
|
|
|
|
// EXTRAS
|
|
|
|
// -------------------------------------------- //
|
|
|
|
|
2015-02-12 12:00:55 +01:00
|
|
|
public Faction getOldFaction() throws MassiveException
|
2014-10-13 15:14:34 +02:00
|
|
|
{
|
2015-05-06 17:04:35 +02:00
|
|
|
return this.readArgAt(1);
|
2014-10-13 15:14:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|