mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-07-07 04:55:10 +00:00
![ementalo](/assets/img/avatar_default.png)
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1424 e251c2fe-e539-e718-e476-b85c1f46cddb
31 lines
668 B
Java
31 lines
668 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import org.bukkit.Location;
|
|
import org.bukkit.Server;
|
|
import com.earth2me.essentials.Essentials;
|
|
import com.earth2me.essentials.User;
|
|
import com.earth2me.essentials.Util;
|
|
|
|
|
|
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();
|
|
}
|
|
|
|
charge(user);
|
|
Location loc = user.getLocation();
|
|
Essentials.getWarps().setWarp(args[0], loc);
|
|
user.sendMessage(Util.format("warpSet", args[0]));
|
|
}
|
|
}
|