Teleporting to spawn/location?

Discussion in 'Plugin Development' started by AstramG, Sep 27, 2012.

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

    AstramG

    How would I teleport myself to spawn with a command? I forget how to do it :( Anyone want to explain how? That'd be great :)
     
  2. Offline

    skore87

    Just call the teleport method on player with the world.getSpawnLocation()
     
  3. Offline

    MCForger

    If you want to make your own /spawn command then you need to make a /setspawn which stores the world, Players BlockX (y and z). Then on /spawn you grab from the config file the coords that you set and stored and if that is null for some reason get the world and do the world.getSpawnLocation().

    If you want to see example code just re-comment asking.
     
Thread Status:
Not open for further replies.

Share This Page