Teleporting Help

Discussion in 'Plugin Development' started by CoderRevolq, Mar 30, 2014.

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

    CoderRevolq

    When making a teleporting plugin the player gets teleported to the coord but they face a different way, then get teleported in the corner of the block, people told me I can fix this by getting the yaw and the pitch, but how do I do that? How do I make a teleport with the yaw and the pitch in it.
     
  2. Offline

    jthort

  3. Offline

    JBoss925

    If you don't wanna mess with yaw and stuff (though I recommend you do) you can also do:
    Code:java
    1. Direction d = p.getDirection();
    2. //teleport player
    3. p.setDirection(d);
     
  4. Offline

    Opacification

    JBoss925 please remove

    Code:
    Leave a like if I helped!
    from your signature as it's against the rules.
     
  5. Offline

    JBoss925

    Alright. Sorry?
     
  6. Offline

    Gamecube762

    Code:java
    1. Location l = location ( x , y , z , yaw , pitch )
    2. p.tp(l)
    Also this thread gives more info on how the pitch and yaw work in MC/Bukkit and how to use them to create vectors.
     
Thread Status:
Not open for further replies.

Share This Page