1.8.8 How can I change the default player spawning algorithm to work with a custom world generator?

Discussion in 'Spigot Plugin Development' started by jul2040, Feb 20, 2020.

  1. I have made a custom world generator that has a bedrock roof at y=255. How can I make it so that players do not spawn on the roof?
     
  2. DevSnx

    DevSnx Previously Snx

    Maybe PlayerMoveEvent, get the Location and check "y" when its higher than 255 than telport player down

    Sorry for my English :D
     
  3. But then wouldn't the player see themselves above bedrock before teleporting down? also, I would have to listen for PlayerMoveEvent which would significantly increase server load.
     
  4. Try to use PlayerSpawnLocationEvent, but not sure is it a thing on 1.8. If it's not - listen for PlayerJoinEvent and check if player joined the server for first time and then teleport player to spawn.
     
    • Agree Agree x 1
  5. DevSnx

    DevSnx Previously Snx

    or try this :D