1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-10-04 01:51:58 +02:00

The /tpahere command now stores the location of 'here' rather than using the current players location.

Cleanup teleport logic - This also fixes exploiting /tpahere to get accesses to restricted areas.
This commit is contained in:
KHobbits
2013-08-11 16:37:21 +01:00
parent 47c62dbc6c
commit 7c5cdb9931
7 changed files with 32 additions and 34 deletions

View File

@@ -96,6 +96,7 @@ public class Teleport implements net.ess3.api.ITeleport
{
cancel(false);
teleportee.setLastLocation();
teleportee.requestTeleport(null, false);
teleportee.getBase().teleport(LocationUtil.getSafeDestination(target.getLocation()), cause);
}
@@ -157,14 +158,6 @@ public class Teleport implements net.ess3.api.ITeleport
initTimer((long)(delay * 1000.0), teleportee, target, chargeFor, cause, false);
}
//The teleportToMe function is a wrapper used to handle teleporting players to them, like /tphere
@Override
public void teleportToMe(IUser otherUser, Trade chargeFor, TeleportCause cause) throws Exception
{
ITarget target = new PlayerTarget(teleportOwner.getBase());
teleport(otherUser, target, chargeFor, cause);
}
//The respawn function is a wrapper used to handle tp fallback, on /jail and /home
@Override
public void respawn(final Trade chargeFor, TeleportCause cause) throws Exception