Factions3/src/com/massivecraft/factions/cmd/CmdFactionsSetXAll.java

39 lines
922 B
Java
Raw Normal View History

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.entity.Faction;
2015-02-12 12:00:55 +01:00
import com.massivecraft.massivecore.MassiveException;
2015-05-06 17:04:35 +02:00
import com.massivecraft.massivecore.cmd.arg.ARString;
2014-11-19 10:30:44 +01:00
public abstract class CmdFactionsSetXAll extends CmdFactionsSetX
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
2014-11-19 10:30:44 +01:00
public CmdFactionsSetXAll(boolean claim)
{
2014-11-19 10:30:44 +01:00
// Super
super(claim);
// Args
2015-05-06 17:04:35 +02:00
this.addArg(ARString.get(), "all|map");
this.addArg(ARFaction.get(), "faction");
2014-11-19 10:30:44 +01:00
if (claim)
{
2015-05-06 17:04:35 +02:00
this.addArg(ARFaction.get(), "newfaction");
2014-11-19 10:30:44 +01:00
this.setFactionArgIndex(2);
}
}
// -------------------------------------------- //
// EXTRAS
// -------------------------------------------- //
2015-02-12 12:00:55 +01:00
public Faction getOldFaction() throws MassiveException
{
2015-05-06 17:04:35 +02:00
return this.readArgAt(1);
}
}