Also sethome

This commit is contained in:
Magnus Ulf 2021-03-02 22:15:54 +01:00
parent cbf9246981
commit 141bf2f6fc
3 changed files with 76 additions and 2 deletions

View File

@ -29,6 +29,8 @@ public class CmdFactions extends FactionsCommand
public CmdFactionsLeave cmdFactionsLeave = new CmdFactionsLeave();
public CmdFactionsWarp cmdFactionsWarp = new CmdFactionsWarp();
public CmdFactionsHome cmdFactionsHome = new CmdFactionsHome();
public CmdFactionsSethome cmdFactionsSethome = new CmdFactionsSethome();
public CmdFactionsUnsethome cmdFactionsUnsethome = new CmdFactionsUnsethome();
public CmdFactionsVote cmdFactionsVote = new CmdFactionsVote();
public CmdFactionsMap cmdFactionsMap = new CmdFactionsMap();
public CmdFactionsCreate cmdFactionsCreate = new CmdFactionsCreate();
@ -79,8 +81,6 @@ public class CmdFactions extends FactionsCommand
// Deprecated Commands
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsRank, "leader", "owner", "officer", "moderator", "coleader"));
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp.cmdFactionWarpAdd, "sethome"));
this.addChild(new MassiveCommandDeprecated(this.cmdFactionsWarp.cmdFactionWarpRemove, "unsethome"));
}
// -------------------------------------------- //

View File

@ -0,0 +1,37 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.util.MUtil;
import java.util.List;
public class CmdFactionsSethome extends FactionsCommandWarp
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsSethome()
{
// Requirements
this.addRequirements(RequirementIsPlayer.get());
// Visibility
this.setVisibility(Visibility.INVISIBLE);
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform() throws MassiveException
{
List<String> args = MUtil.list(MConf.get().warpsHomeName);
CmdFactions.get().cmdFactionsWarp.cmdFactionWarpAdd.execute(me, args);
}
}

View File

@ -0,0 +1,37 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.massivecore.MassiveException;
import com.massivecraft.massivecore.command.Visibility;
import com.massivecraft.massivecore.command.requirement.RequirementIsPlayer;
import com.massivecraft.massivecore.util.MUtil;
import java.util.List;
public class CmdFactionsUnsethome extends FactionsCommandWarp
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsUnsethome()
{
// Requirements
this.addRequirements(RequirementIsPlayer.get());
// Visibility
this.setVisibility(Visibility.INVISIBLE);
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform() throws MassiveException
{
List<String> args = MUtil.list(MConf.get().warpsHomeName);
CmdFactions.get().cmdFactionsWarp.cmdFactionWarpRemove.execute(me, args);
}
}