Fix bug where old relation commands did not work due to invalid argument order
This commit is contained in:
		@@ -40,7 +40,11 @@ public class CmdFactionsRankOld extends FactionsCommand
 | 
			
		||||
	@Override
 | 
			
		||||
	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;
 | 
			
		||||
 | 
			
		||||
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.util.MUtil;
 | 
			
		||||
 | 
			
		||||
@@ -26,7 +27,7 @@ public class CmdFactionsRelationOld extends FactionsCommand
 | 
			
		||||
		this.addAliases(relName);
 | 
			
		||||
 | 
			
		||||
		// Parameters
 | 
			
		||||
		this.addParameter(TypeFaction.get(), "faction");
 | 
			
		||||
		this.addParameter(TypeFaction.get(), "faction", true);
 | 
			
		||||
 | 
			
		||||
		// Visibility
 | 
			
		||||
		this.setVisibility(Visibility.INVISIBLE);
 | 
			
		||||
@@ -37,9 +38,16 @@ public class CmdFactionsRelationOld extends FactionsCommand
 | 
			
		||||
	// -------------------------------------------- //
 | 
			
		||||
 | 
			
		||||
	@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
 | 
			
		||||
		));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user