OK so I saw your post trying to see if anyone had my problem. Your problem was my problem EXACTLY. However, I figured out how to fix it. In player.mcServer.getConfigurationManager().transferPlayerToDimension(player, 0, new TeleporterSadiraj(mServer.worldServerForDimension(1)));
you have to set the worldServerForDimension(int) to 0 not 1.
If its important to you (or whomever else has this problem) to understand code rather than copypaste (like it is for myself) then here is the process through which I went through to figure out the problem:
First of all i figured EXACTLY what was going wrong. What was happening, as you explained, was that going to a custom dimension worked fine but coming back to the overworld made the player spawn at the EXACT coords that were stored at the location of the player when teleporting. This caused the player to spawn either in the ground or above the ground. So what i figured at first was that something must be going wrong in the teleport class but then i looked at the code that brought me to the tele class in the first place. The portal block class. You were right again at where the problem was (inside of onEntityCollideWithBlock). So i looked into this method (idk if that's the right word I'm still learning) and found where it was calling the custom tele class. It was a method from the ServerConfigurationManager class (transferPlayerToDimension). I saw in eclipse when i hovered over the method that it said that the last parameter was teleporter. I looked at my code and wuppy's and saw the same. Then, more importantly i noticed the parameter in the tele parameter. It was there i realized that there are separate numbers in the first and second callings of the method (tranferplayer...) so i looked at both of them. One was set to be my dimension id and one was set to be 1 corresponding with the overworld id. So i tried to figure out the difference for why they would need to be there. my dimension id was in the else if statement that basically said to go to my dim if i wasn't already there. the else statement said that if I'm in my dimension, go back to the overworld. Using this info i figured that teleport was doing its job just fine (since it worked one way but not the other) but it was the different parameters that i was passing that upset the cycle. So i changed the 1 into a 0 ran MC and it worked. I assume that the spawn coord modifier was being used as if the player was spawning in the end (dimId of 1)and that's why it didn't work. Hopefully my spelling wasn't too terrible and my explanation was at least OK, just wanted to make sure anyone who could learn from this would be able to rather than just copy paste like so many tuts that Ive seen would have you do rather than explain. Wuppy's tuts are really good at explaining most things its just that it was 1.6 code that i don't think he updated in his 1.7 update videos (like he forgot to do this part, i realize that the video exists).
-bloxy, a well known modder (someday eventually )