Regonite Posted January 27, 2021 Share Posted January 27, 2021 How to save a player's location when they change worlds. Link to comment Share on other sites More sharing options...
CoolProgrammer Posted January 27, 2021 Share Posted January 27, 2021 (edited) on teleport: set {lastloc::%player's uuid%} to player's location command /back: trigger: teleport player to {lastloc::%player's uuid%} Little bit of explanation: The reason you can't use on world change event is, because that event doesn't allow you to get player's last location, or player's last world, and instead just get: event-player, event-world. But, on teleport event allows you to get these: event-block, event-world, event-player, event-teleportcause. Whenever a player teleports, it will store their immediate location in the variable {lastloc::%player's uuid%} and then teleport them. The on teleport event is also triggered when a player changes their world, so that way, you can store their previous location. Good luck. Edited January 28, 2021 by CoolProgrammer Hello there! If you're reading this, hope you're having a wonderful day! Â Feel free to contact me via Discord (CoolProgrammer#1920) for any help. My DMs are always open for help. You can also message via. forum messages for help. Also, don't hesitate to leave a like on my post if I helped you in any way. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now