Converting XYZ Coords to Location

Discussion in 'Plugin Development' started by iKeirNez, May 27, 2012.

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

    iKeirNez

    Basically I have the values of X, Y, Z, Yaw, Pitch and World, but I need to change it to a Location. Basically I am using an API that requires a location as an input, not X, Y, Z, Yaw, Pitch & World. And yes I tried casting and it didn't work.

    Keir
     
  2. Offline

    edocsyl

    Code:
           
    World tWorld = Bukkit.getServer().getWorld("WORLD STRING");
     Location tLoc = new Location(tWorld, X_DOUBLE, Y_DOUBLE, Z_DOUBLE);
    
     
  3. Offline

    iKeirNez

    Thanks so much! But how would I add Yaw and Pitch?
     
  4. Offline

    desht

    loc.setPitch() and loc.setYaw() will do it. The Javadocs are your friend :)
     
  5. Offline

    kumpelblase2

  6. Offline

    iKeirNez

Thread Status:
Not open for further replies.

Share This Page