Fix bug where old relation commands did not work due to invalid argument order
This commit is contained in:
parent
79f5eab44e
commit
7dcfa3b376
@ -40,7 +40,11 @@ public class CmdFactionsRankOld extends FactionsCommand
|
|||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform()
|
||||||
{
|
{
|
||||||
CmdFactions.get().cmdFactionsRank.execute(sender, MUtil.list(this.argAt(0), this.rankName, this.argAt(1)));
|
CmdFactions.get().cmdFactionsRank.execute(sender, MUtil.list(
|
||||||
|
this.argAt(0),
|
||||||
|
this.rankName,
|
||||||
|
this.argAt(1)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package com.massivecraft.factions.cmd;
|
package com.massivecraft.factions.cmd;
|
||||||
|
|
||||||
import com.massivecraft.factions.cmd.type.TypeFaction;
|
import com.massivecraft.factions.cmd.type.TypeFaction;
|
||||||
|
import com.massivecraft.factions.entity.Faction;
|
||||||
|
import com.massivecraft.massivecore.MassiveException;
|
||||||
import com.massivecraft.massivecore.command.Visibility;
|
import com.massivecraft.massivecore.command.Visibility;
|
||||||
import com.massivecraft.massivecore.util.MUtil;
|
import com.massivecraft.massivecore.util.MUtil;
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ public class CmdFactionsRelationOld extends FactionsCommand
|
|||||||
this.addAliases(relName);
|
this.addAliases(relName);
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
this.addParameter(TypeFaction.get(), "faction");
|
this.addParameter(TypeFaction.get(), "faction", true);
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
this.setVisibility(Visibility.INVISIBLE);
|
this.setVisibility(Visibility.INVISIBLE);
|
||||||
@ -37,9 +38,16 @@ public class CmdFactionsRelationOld extends FactionsCommand
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform()
|
public void perform() throws MassiveException
|
||||||
{
|
{
|
||||||
CmdFactions.get().cmdFactionsRelation.cmdFactionsRelationSet.execute(sender, MUtil.list(this.relName, this.argAt(0)));
|
// Arguments
|
||||||
|
Faction faction = this.readArg();
|
||||||
|
|
||||||
|
// Apply
|
||||||
|
CmdFactions.get().cmdFactionsRelation.cmdFactionsRelationSet.execute(sender, MUtil.list(
|
||||||
|
faction.getId(),
|
||||||
|
this.relName
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user