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

29 lines
631 B
Java
Raw Normal View History

package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
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
2011-12-01 13:42:39 +00:00
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
2011-12-01 13:42:39 +00:00
final Location loc = user.getLocation();
ess.getWarps().setWarp(args[0], loc);
user.sendMessage(_("warpSet", args[0]));
}
}