MassiveCore changes.

This commit is contained in:
Olof Larsson 2015-04-09 11:55:44 +02:00
parent 26dd2f7cbd
commit 6c61da2b8d
3 changed files with 9 additions and 50 deletions

View File

@ -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"));
}
// -------------------------------------------- //

View File

@ -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)
{

View File

@ -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("<i>Use this new command instead:");
sendMessage(target.getUseageTemplate(true));
}
}