mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 11:37:30 +02:00
Teleport cleanup
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user