Different Worlds

Discussion in 'Plugin Development' started by bkleinman1, Sep 21, 2013.

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

    bkleinman1

    I need to make a plugin that will let a player do a command and it will create a new world for them that they will then be teleported to, i also need the world to be an exact replica of another world that i will already of built. So far (This is probably the completely wrong way of doing it) i have made it so that if someone does a command it will run a function that copies the world folder and then pastes it again but with a different name (by using a counter every time the function is run). Now that i have the new world folder called server1, is there a way of teleporting the player who did the command, to the world.
    I have tried:
    Code:java
    1. player.teleport(new Location(Bukkit.getWorld("server" + nw.counter), 72, 69, 25));

    but that didnt seem to work, im not really sure what the bukkit.getWorld does, does it get a world folder in the server directory? or what?
     
  2. Offline

    caseif

    Did you load the world which you previously copied?
     
  3. Offline

    bkleinman1

    AngryNerd How would i do that?
     
  4. Offline

    bkleinman1

  5. Offline

    The_Doctor_123

    bkleinman1
    getWorld() returns a loaded world with the given world name. I'm not on my computer, so I cannot tell you what the code would be to load a world. I'll tell you, it pays off to just browse through methods or look at the JavaDocs..
     
  6. Offline

    bkleinman1

    The_Doctor_123 isnt that what i was doing when i did
    Code:java
    1. Bukkit.getWorld("server" + nw.counter)

    ?
     
  7. Offline

    The_Doctor_123

Thread Status:
Not open for further replies.

Share This Page