Spawn Command for single player

Discussion in 'Plugin Development' started by zJanny, Sep 23, 2019.

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

    zJanny

    Hello,
    I want to make a command that sets the spawn for diferrent players
    For exmaple /setspawn player1
    /setspawn player2

    and player1 spawn on a different location than player2 because i set the spawn at another point.
    Can someone help me how to create this?

    I have a working /setspawn command for a spawn every player spawns on
     
  2. Offline

    timtower Administrator Administrator Moderator

    @zJanny Store the information based on the player uuid, and then check if the player has a specific spawn saved, if so: respawn there.
    If not: respawn at the main spawn.
     
  3. Offline

    zJanny

    I will have to do it with the offline player method because the players i set the spawns for will never be before on the server.
    So i should use the OfflinePlayer method with UUID?
     
  4. Offline

    timtower Administrator Administrator Moderator

    Why set spawns for new players? Seems illogical to me.
    And no, you can do it with just the UUID.
     
  5. Offline

    zJanny

    Because i am trying to do a plugin for a PvP event like Varo if you know it.
    And the player have to spawn i "holes" but the players are not on the server before the event starts so i have to set their spawns without them beeing on the server once
     
  6. Offline

    timtower Administrator Administrator Moderator

    I don't know Varo.
    But it sounds like you can just pre-set a couple holes and find an empty one whenever a player joins.
     
  7. Offline

    zJanny

    I am new to coding i think i dont know how to do this, but i think i will find a other option
     
  8. Offline

    timtower Administrator Administrator Moderator

    Start with having a list of spawn points.
    We can walk you through this ;)
     
  9. Offline

    zJanny

    The problem is. The project will start in 3 months and i dont have a map. So in this time i will find a way to make it. So the problem is solved for now :)
     
  10. Offline

    timtower Administrator Administrator Moderator

    Don't need to be valid points to test :confused:
     
  11. Offline

    zJanny

    Okay, so can you explain me how to do it?
     
  12. Offline

    timtower Administrator Administrator Moderator

    Make a list of spawn points.
     
Thread Status:
Not open for further replies.

Share This Page