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

30 lines
800 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 com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
2011-11-18 17:42:26 +00:00
import org.bukkit.Server;
public class Commandtphere extends EssentialsCommand
{
public Commandtphere()
{
super("tphere");
}
@Override
2011-11-18 19:30:05 +00:00
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
2011-11-18 19:30:05 +00:00
final User player = getPlayer(server, args, 0);
if (!player.isTeleportEnabled())
{
2011-11-18 19:30:05 +00:00
throw new Exception(Util.format("teleportDisabled", player.getDisplayName()));
}
2011-11-18 19:30:05 +00:00
player.getTeleport().teleport(user, new Trade(this.getName(), ess));
user.sendMessage(Util.i18n("teleporting"));
2011-11-18 19:30:05 +00:00
player.sendMessage(Util.i18n("teleporting"));
2011-08-30 02:42:31 +00:00
throw new NoChargeException();
}
}