Automatically spawn joined player on his spawn?

Discussion in 'Plugin Development' started by IconByte, Apr 9, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    IconByte

    Hello, I am wondering how I would do like SkyWars spawning, when you join, then it puts you automatically to your own island and when another join then he joins on another island and so on..?
     
  2. Offline

    MaTaMoR_

    Where's your code ?
     
  3. Offline

    Zombie_Striker

    • Get all the locations or make a int that can increment and be multiplied to get the location that doesn't belong to someone.
    • OnJoin p.teleport(Location);
    • Spawn the blocks (if needed)
     
  4. Offline

    IconByte

    Tried that, but when player decides to quit then the int stays still as it was, so when another player joins then he don't get disconnected player's island.
     
  5. Offline

    Zombie_Striker

    The make an on Quit and reduces the int. Or make a Map that stores an Integer, UUID (Int the island, The UUId the player)

    Although, If you want, you can do the reverse and make a UUID,Integer, map to assign one island to one player always.
     
Thread Status:
Not open for further replies.

Share This Page