TF-EssentialsX/Essentials/src/com/earth2me/essentials/commands/Commandsetwarp.java

29 lines
602 B
Java
Raw Normal View History

package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
2011-11-18 17:42:26 +00:00
import org.bukkit.Location;
import org.bukkit.Server;
public class Commandsetwarp extends EssentialsCommand
{
public Commandsetwarp()
{
super("setwarp");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
Location loc = user.getLocation();
ess.getWarps().setWarp(args[0], loc);
user.sendMessage(Util.format("warpSet", args[0]));
}
}