Teleporting players to coordinates

Discussion in 'Plugin Development' started by KaiPol, Nov 18, 2013.

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

    KaiPol

    Okay so I'm making a gamemode of sorts and I want to teleport the players to specific coordinates and not a player. Does anyone know how to do this?
     
  2. Offline

    1Rogue

    Code:java
    1. Player p; // Player to teleport
    2. World world = Bukkit.getServer().getWorld(/*world name or UUID*/);
    3. Location loc = new Location(world, /*x*/, /*y*/, /*z*/); // all ints
    4. p.teleport(loc);
     
    KaiPol likes this.
  3. Offline

    KaiPol

    Thank you! This is just what I needed!
     
Thread Status:
Not open for further replies.

Share This Page