MassiveCore changes.
This commit is contained in:
parent
26dd2f7cbd
commit
6c61da2b8d
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.Perm;
|
import com.massivecraft.factions.Perm;
|
||||||
import com.massivecraft.factions.entity.MConf;
|
import com.massivecraft.factions.entity.MConf;
|
||||||
|
import com.massivecraft.massivecore.cmd.DeprecatedCommand;
|
||||||
import com.massivecraft.massivecore.cmd.HelpCommand;
|
import com.massivecraft.massivecore.cmd.HelpCommand;
|
||||||
import com.massivecraft.massivecore.cmd.VersionCommand;
|
import com.massivecraft.massivecore.cmd.VersionCommand;
|
||||||
|
|
||||||
@ -109,10 +110,10 @@ public class CmdFactions extends FactionsCommand
|
|||||||
this.addSubCommand(this.cmdFactionsVersion);
|
this.addSubCommand(this.cmdFactionsVersion);
|
||||||
|
|
||||||
// Deprecated Commands
|
// Deprecated Commands
|
||||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
|
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsClaim.cmdFactionsClaimAuto, "autoclaim"));
|
||||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));
|
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsUnclaim.cmdFactionsUnclaimAll, "unclaimall"));
|
||||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsFlag, "open"));
|
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFlag, "open"));
|
||||||
this.addSubCommand(new CmdFactionsXDeprecated(this.cmdFactionsFaction, "show", "who"));
|
this.addSubCommand(new DeprecatedCommand(this.cmdFactionsFaction, "show", "who"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -21,6 +21,8 @@ import com.massivecraft.massivecore.cmd.req.ReqIsPlayer;
|
|||||||
import com.massivecraft.massivecore.mixin.Mixin;
|
import com.massivecraft.massivecore.mixin.Mixin;
|
||||||
import com.massivecraft.massivecore.mixin.TeleporterException;
|
import com.massivecraft.massivecore.mixin.TeleporterException;
|
||||||
import com.massivecraft.massivecore.ps.PS;
|
import com.massivecraft.massivecore.ps.PS;
|
||||||
|
import com.massivecraft.massivecore.teleport.Destination;
|
||||||
|
import com.massivecraft.massivecore.teleport.DestinationSimple;
|
||||||
|
|
||||||
|
|
||||||
public class CmdFactionsHome extends FactionsCommandHome
|
public class CmdFactionsHome extends FactionsCommandHome
|
||||||
@ -147,7 +149,8 @@ public class CmdFactionsHome extends FactionsCommandHome
|
|||||||
// Apply
|
// Apply
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Mixin.teleport(me, home, homeDesc, sender);
|
Destination destination = new DestinationSimple(home, homeDesc);
|
||||||
|
Mixin.teleport(me, destination, sender);
|
||||||
}
|
}
|
||||||
catch (TeleporterException e)
|
catch (TeleporterException e)
|
||||||
{
|
{
|
||||||
|
@ -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));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user