I've had a plugin that is supposed to teleport a player back to where they were before logging out, because you get teleported back to spawn with PC gen. I noticed that my players began to suffocate in walls when they logged back in. My question is, is there a way to get the player's old position, but safer?
Save the exact position, then check if a block exists at their current position and teleport them to the highest block at that position.