I use multiverse core and when changing the world I need to save the position before the player teleports, for example the player is in world1 use the command to world2 and before teleporting save his last position in world1, how to do it?
Code:
on player world change:
wait 10 tick
if player has permission "op":
set {LastLocation.%player%} to location of player
stop
command /backtolastlocation:
permission: op
trigger:
if world is "lobby":
teleport player to {LastLocation.%player%}
else:
message "&c Nejsi v lobby"