summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandtpo.java
blob: f3fa6900c1b618dac773bd71be2d93dd51ac7c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.earth2me.essentials.commands;

import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.commands.EssentialsCommand;


public class Commandtpo extends EssentialsCommand
{
	public Commandtpo()
	{
		super("tpo");
	}

	@Override
	public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
	{
		if (args.length < 1)
		{
			user.sendMessage("§c Usage: /tpo [playername]");
		}
		else
		{
			//Just basically the old tp command
			User p = getPlayer(server, args, 0);
			user.teleportCooldown();
			user.charge(this);
			user.teleportToNow(p);
			user.sendMessage("§7Teleporting...");
		}

	}
}