player.teleport(new Location("???" , x, y, z));

Discussion in 'Plugin Development' started by oran10majar, Nov 28, 2013.

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

    oran10majar

    player.teleport(new Location("???" , x, y, z));

    What is the code to teleport player to other world?

    "???" = I need here world...
     
  2. Offline

    elementalgodz11

    Code:
    Location locationame = new Location(Bukkit.getServer().getWorld("world"), x, y, z);
    loc.setYaw(90F); //0F = f0, 90F = f1, 180F = f2, 270F = F3
    p.teleport(loc);
     
  3. Offline

    AdmiralAero

    Code:
    p.teleport(new Location(Bukkit.getWorld("<worldname>"), x.5D, y.0D, z.5D));
    //If you don't add the .5, you'll end up on the corner of the block.
     
  4. Offline

    oran10majar

  5. Offline

    AoH_Ruthless

    oran10majar
    Both AdmiralAero and elementalgodz11 gave you an answer. If that's not what you are looking for, please specify and give us some code that you are having trouble with.

    And, if you want them to see your post, 'tahg' them.
     
  6. Offline

    oran10majar

    Its work now...
     
  7. Offline

    elementalgodz11

    oran10majar
    Probably a good idea to set this thread as solved then
     
Thread Status:
Not open for further replies.

Share This Page