mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-04 17:49:53 +01:00
Suggest new command on using old command.
This commit is contained in:
parent
8d31a0d4a0
commit
2c08c1a32c
@ -93,6 +93,14 @@ public class CmdFactions extends FactionsCommand
|
||||
this.addSubCommand(this.cmdFactionsAdmin);
|
||||
this.addSubCommand(this.cmdFactionsPowerBoost);
|
||||
this.addSubCommand(this.cmdFactionsVersion);
|
||||
|
||||
// Deprecated Commands
|
||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsSet, "claim"));
|
||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsSet, "unclaim"));
|
||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsSet, "autoclaim"));
|
||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsSet, "unclaimall"));
|
||||
|
||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsFaction, "show", "who"));
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
@ -36,7 +36,6 @@ public class CmdFactionsSet extends FactionsCommand
|
||||
this.addSubCommand(this.cmdFactionsSetTransfer);
|
||||
|
||||
// Requirements
|
||||
this.addRequirements(ReqIsPlayer.get());
|
||||
this.addRequirements(ReqHasPerm.get(Perm.SET.node));
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.massivecore.cmd.MassiveCommand;
|
||||
import com.massivecraft.massivecore.cmd.VisibilityMode;
|
||||
|
||||
|
||||
public class CmdFactionsXDeprecated extends FactionsCommand
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
public MassiveCommand target;
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public CmdFactionsXDeprecated(MassiveCommand target, String... aliases)
|
||||
{
|
||||
// Fields
|
||||
this.target = target;
|
||||
|
||||
// Aliases
|
||||
this.addAliases(aliases);
|
||||
|
||||
// Args
|
||||
this.setErrorOnToManyArgs(false);
|
||||
|
||||
// Visibility
|
||||
this.setVisibilityMode(VisibilityMode.INVISIBLE);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
msg("<i>Use this new command instead:");
|
||||
sendMessage(target.getUseageTemplate(true));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user