1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-17 20:11:21 +02:00

Teleport cleanup

This commit is contained in:
KHobbits
2013-08-13 18:06:24 +01:00
parent bf834ae061
commit 5b94d28f7f
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); 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 //If we need to cancelTimer a pending teleportPlayer call this method
private void cancel(boolean notifyUser) private void cancel(boolean notifyUser)
{ {

View File

@@ -109,12 +109,4 @@ public interface ITeleport
*/ */
public void back() throws Exception; 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())); throw new Exception(_("noPerm", "essentials.worlds." + loc.getWorld().getName()));
} }
user.getTeleport().home(loc, charge); user.getTeleport().teleport(loc, charge, TeleportCause.COMMAND);
} }
} }