diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactions.java b/src/main/java/com/massivecraft/factions/cmd/CmdFactions.java index 97f2ec32..7215a50a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFactions.java @@ -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")); } // -------------------------------------------- // diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSet.java b/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSet.java index f103e4b1..d15ec448 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSet.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFactionsSet.java @@ -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)); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java b/src/main/java/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java new file mode 100644 index 00000000..051e6c8a --- /dev/null +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java @@ -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("Use this new command instead:"); + sendMessage(target.getUseageTemplate(true)); + } + +}