mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-03 22:08:28 +00:00
Fix regression in /back behavior (#4264)
This commit is contained in:
parent
d4e194fbf7
commit
9bd35a2cd2
2 changed files with 7 additions and 3 deletions
|
@ -163,7 +163,6 @@ public class AsyncTeleport implements IAsyncTeleport {
|
|||
future.complete(false);
|
||||
return;
|
||||
}
|
||||
teleportee.setLastLocation();
|
||||
|
||||
if (!ess.getSettings().isForcePassengerTeleport() && !teleportee.getBase().isEmpty()) {
|
||||
if (!ess.getSettings().isTeleportPassengerDismount()) {
|
||||
|
@ -178,7 +177,11 @@ public class AsyncTeleport implements IAsyncTeleport {
|
|||
return;
|
||||
}
|
||||
}
|
||||
teleportee.setLastLocation();
|
||||
|
||||
if (teleportee.isAuthorized("essentials.back.onteleport")) {
|
||||
teleportee.setLastLocation();
|
||||
}
|
||||
|
||||
final Location targetLoc = target.getLocation();
|
||||
if (ess.getSettings().isTeleportSafetyEnabled() && LocationUtil.isBlockOutsideWorldBorder(targetLoc.getWorld(), targetLoc.getBlockX(), targetLoc.getBlockZ())) {
|
||||
targetLoc.setX(LocationUtil.getXInsideWorldBorder(targetLoc.getWorld(), targetLoc.getBlockX()));
|
||||
|
|
|
@ -262,7 +262,8 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
|||
}
|
||||
|
||||
public Location getLastLocation() {
|
||||
return holder.lastLocation().location();
|
||||
final LazyLocation lastLocation = holder.lastLocation();
|
||||
return lastLocation != null ? lastLocation.location() : null;
|
||||
}
|
||||
|
||||
public void setLastLocation(final Location loc) {
|
||||
|
|
Loading…
Reference in a new issue