From 6c61da2b8d657ef633138a6813451981c022d79c Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 9 Apr 2015 11:55:44 +0200 Subject: [PATCH] MassiveCore changes. --- .../factions/cmd/CmdFactions.java | 9 ++-- .../factions/cmd/CmdFactionsHome.java | 5 ++- .../factions/cmd/CmdFactionsXDeprecated.java | 45 ------------------- 3 files changed, 9 insertions(+), 50 deletions(-) delete mode 100644 src/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java diff --git a/src/com/massivecraft/factions/cmd/CmdFactions.java b/src/com/massivecraft/factions/cmd/CmdFactions.java index 04555ad4..2da2d058 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactions.java +++ b/src/com/massivecraft/factions/cmd/CmdFactions.java @@ -5,6 +5,7 @@ import java.util.List; import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.entity.MConf; +import com.massivecraft.massivecore.cmd.DeprecatedCommand; import com.massivecraft.massivecore.cmd.HelpCommand; import com.massivecraft.massivecore.cmd.VersionCommand; @@ -109,10 +110,10 @@ public class CmdFactions extends FactionsCommand this.addSubCommand(this.cmdFactionsVersion); // Deprecated Commands - this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim")); - this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall")); - this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsFlag, "open")); - this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsFaction, "show", "who")); + this.addSubCommand(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim")); + this.addSubCommand(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall")); + this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFlag, "open")); + this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who")); } // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java index 927268e7..4786f115 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsHome.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsHome.java @@ -21,6 +21,8 @@ import com.massivecraft.massivecore.cmd.req.ReqIsPlayer; import com.massivecraft.massivecore.mixin.Mixin; import com.massivecraft.massivecore.mixin.TeleporterException; import com.massivecraft.massivecore.ps.PS; +import com.massivecraft.massivecore.teleport.Destination; +import com.massivecraft.massivecore.teleport.DestinationSimple; public class CmdFactionsHome extends FactionsCommandHome @@ -147,7 +149,8 @@ public class CmdFactionsHome extends FactionsCommandHome // Apply try { - Mixin.teleport(me, home, homeDesc, sender); + Destination destination = new DestinationSimple(home, homeDesc); + Mixin.teleport(me, destination, sender); } catch (TeleporterException e) { diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java b/src/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java deleted file mode 100644 index 051e6c8a..00000000 --- a/src/com/massivecraft/factions/cmd/CmdFactionsXDeprecated.java +++ /dev/null @@ -1,45 +0,0 @@ -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)); - } - -}