Vanilla Spawn

Discussion in 'Requests' started by MidWolfhunter, Jun 13, 2020.

  1. MidWolfhunter

    MidWolfhunter Silverfish

    Messages:
    22
    Is there any vanilla random spawn plugin that teleports players to random locations when they join for the first time, and teleports them to random locations when they die and they don't have a bed?
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,384
    GitHub:
    HimbeersaftLP
    What does Vanilla mean in that context?
     
  3. MidWolfhunter

    MidWolfhunter Silverfish

    Messages:
    22
    When you join a world, you Teleport to a random location and start surviving. I want the same consent, but each player should be teleported in different places
     
  4. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    109
    GitHub:
    jviguy
    hey i can probally code u a plugin that teleports a player to a random location everytime they join dont know about Their First time only though but i could do death.
     
  5. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,384
    GitHub:
    HimbeersaftLP
  6. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    109
    GitHub:
    jviguy
  7. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,384
    GitHub:
    HimbeersaftLP
    I think it'd be better if you could define the area in a config file instead of hardcoding it. Also using $level->getSafeSpawn($position) would frustrate players less than having them fall from the sky or spawn inside the ground when joining for the first time because you randomise the y position.
    And why are you changing the join message? That's outside the scope of the plugin (see also: https://en.m.wikipedia.org/wiki/Principle_of_least_astonishment)
    Otherwise it's great, thanks!
     
  8. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    109
    GitHub:
    jviguy
    that was just to test if it works ill change it
     
  9. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    109
    GitHub:
    jviguy
    Question What Should I define $level as?
     
    Last edited: Jun 17, 2020
  10. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    109
    GitHub:
    jviguy
    Small problem Cant Use a config because RandFunction Needs the parameters to be a integer and i dont know how to make a variable to a integer im just a beginner at php so i dont know lol.
     
    Last edited: Jun 16, 2020
  11. JviguyGamesYT

    JviguyGamesYT Baby Zombie

    Messages:
    109
    GitHub:
    jviguy
    hey i updated code the code now uses a faster function for randomizing attempted a config didn't work out and made the code put you closer to the ground atleast 3 blocks high to 1 in my tests.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.