Readd /f promote and /f demote closing #13

This commit is contained in:
Magnus Ulf 2019-03-22 16:13:07 +01:00
parent bcae649e0e
commit 1157607397
2 changed files with 54 additions and 2 deletions

View File

@ -63,7 +63,7 @@ public class CmdFactions extends FactionsCommand
public CmdFactionsMoneyconvert cmdFactionsMoneyconvert = new CmdFactionsMoneyconvert(); public CmdFactionsMoneyconvert cmdFactionsMoneyconvert = new CmdFactionsMoneyconvert();
public CmdFactionsConfig cmdFactionsConfig = new CmdFactionsConfig(); public CmdFactionsConfig cmdFactionsConfig = new CmdFactionsConfig();
public CmdFactionsClean cmdFactionsClean = new CmdFactionsClean(); public CmdFactionsClean cmdFactionsClean = new CmdFactionsClean();
public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get()).addRequirements(RequirementHasPerm.get(Perm.VERSION)); public MassiveCommandVersion cmdFactionsVersion = new MassiveCommandVersion(Factions.get());
// -------------------------------------------- // // -------------------------------------------- //
// CONSTRUCT // CONSTRUCT
@ -71,8 +71,12 @@ public class CmdFactions extends FactionsCommand
public CmdFactions() public CmdFactions()
{ {
// Old rank stuff
this.addChild(new CmdFactionsRankOld("demote"));
this.addChild(new CmdFactionsRankOld("promote"));
// Deprecated Commands // Deprecated Commands
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsRank, "leader", "owner", "officer", "moderator", "demote", "promote")); this.addChild(new MassiveCommandDeprecated(this.cmdFactionsRank, "leader", "owner", "officer", "moderator", "coleader"));
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp, "home")); this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp, "home"));
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp.cmdFactionWarpAdd, "sethome")); this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp.cmdFactionWarpAdd, "sethome"));
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp.cmdFactionWarpRemove, "unsethome")); this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp.cmdFactionWarpRemove, "unsethome"));

View File

@ -0,0 +1,48 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.cmd.type.TypeMPlayer;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.util.MUtil;
public class CmdFactionsRankOld extends FactionsCommand
{
// -------------------------------------------- //
// FIELDS
// -------------------------------------------- //
public final String rankName;
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsRankOld(String rank)
{
// Fields
this.rankName = rank.toLowerCase();
this.setSetupEnabled(false);
// Aliases
this.addAliases(rankName);
// Parameters
this.addParameter(TypeMPlayer.get(), "player");
// Visibility
this.setVisibility(Visibility.INVISIBLE);
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform()
{
CmdFactions.get().cmdFactionsRank.cmdFactionsRankSet.execute(sender, MUtil.list(
this.argAt(0),
this.rankName
));
}
}