summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
blob: f9ea9fa36f8a97d573c87d4778ac17227395f169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.earth2me.essentials.spawn;

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


public class Commandspawn extends EssentialsCommand
{
	public Commandspawn()
	{
		super("spawn");
	}

	@Override
	public void run(Server server, User user, String commandLabel, String[] args) throws Exception
	{
		final Trade charge = new Trade(this.getName(), ess);
		charge.isAffordableFor(user);
		user.getTeleport().respawn(ess.getSpawn(), charge);
	}
}