In middle of the ocean and can't find land

I spawned in the middle of the ocean. I tried flying to find land, but I can't find any. Can I teleport to land, and if I can, how?


Solution 1:

The spreadplayers command will always place you on land. Try running this:

/spreadplayers ~ ~ 0 1000 false @p

If no land is found still, increase the 1000 (maxRange) and try again.

Solution 2:

Use your map to find nearby land. Of course everything on the map won't be shown until you explored them. Try to explore the entire map to find land. Or as colorfusion said use the command /spreadplayers ~ ~ 0 1000 false @p. If you still can't find land and you need to find land, start another world with a different seed so there's a chance you will spawn on land. In fact, it's 90% chance you'll spawn on land so don't worry.