I'm stuck in the void

I was dumb and used a command that sets my spawn in the void, and it's too far down to be able to fly out. I'm playing on PC. How do I get back?
(I'm in a Super Flat world.)


Solution 1:

if you can type fast enough set your gamemode to creative so you dont take damage then teleport back to the top using the command enter preformatted text here /tp (your name here) 0 ~ 0

this should get you back to the surface. not sure about where your base is though