Essentials/EssentialsSpawn/src/com/earth2me/essentials/spawn/Commandspawn.java
snowleo 5ae48481bd Refactoring: New Charge class
user.canAfford(String), user.canAfford(EssentialsCommand), user.charge(String), user.charge(EssentialsCommand) have been removed.
Teleport class has been changed to use the Charge class.
This also fixes some bugs, like the one with warp signs.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1512 e251c2fe-e539-e718-e476-b85c1f46cddb
2011-05-22 18:53:23 +00:00

25 lines
592 B
Java

package com.earth2me.essentials.spawn;
import com.earth2me.essentials.Charge;
import org.bukkit.Server;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
import com.earth2me.essentials.commands.EssentialsCommand;
public class Commandspawn extends EssentialsCommand
{
public Commandspawn()
{
super("spawn");
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
Charge charge = new Charge(this);
charge.isAffordableFor(user);
user.getTeleport().respawn(Essentials.getSpawn(), charge);
}
}