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

30 lines
745 B
Java
Raw Normal View History

package com.earth2me.essentials.commands;
2011-06-13 13:05:11 +00:00
import com.earth2me.essentials.Trade;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
public class Commandtphere extends EssentialsCommand
{
public Commandtphere()
{
super("tphere");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
User p = getPlayer(server, args, 0);
if (!p.isTeleportEnabled())
{
throw new Exception(Util.format("teleportDisabled", p.getDisplayName()));
}
2011-06-13 13:05:11 +00:00
p.getTeleport().teleport(user, new Trade(this.getName(), ess));
user.sendMessage(Util.i18n("teleporting"));
p.sendMessage(Util.i18n("teleporting"));
2011-08-30 02:42:31 +00:00
throw new NoChargeException();
}
}