Teleport cleanup

This commit is contained in:
KHobbits 2013-08-13 18:06:24 +01:00
parent a3cae43f9f
commit 1ac5b4230e
3 changed files with 1 additions and 16 deletions

View File

@ -227,13 +227,6 @@ public class Teleport implements net.ess3.api.ITeleport
now(teleportOwner, new LocationTarget(teleportOwner.getLastLocation()), TeleportCause.COMMAND);
}
//This function handles teleporting to /home
@Override
public void home(Location loc, Trade chargeFor) throws Exception
{
teleport(teleportOwner, new LocationTarget(loc), chargeFor, TeleportCause.COMMAND);
}
//If we need to cancelTimer a pending teleportPlayer call this method
private void cancel(boolean notifyUser)
{

View File

@ -109,12 +109,4 @@ public interface ITeleport
*/
public void back() throws Exception;
/**
* Teleport wrapper used to handle /home teleports
*
* @param loc - Location where player will be teleported too
* @param chargeFor - What the user will be charged if teleportPlayer is successful
* @throws Exception
*/
public void home(Location loc, Trade chargeFor) throws Exception;
}

View File

@ -105,6 +105,6 @@ public class Commandhome extends EssentialsCommand
{
throw new Exception(_("noPerm", "essentials.worlds." + loc.getWorld().getName()));
}
user.getTeleport().home(loc, charge);
user.getTeleport().teleport(loc, charge, TeleportCause.COMMAND);
}
}