svdragster

teleport

Feb 25th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.         double pitch = (player.getPitch() + 90.0F) * Math.PI / 180.0D;
  2.         double rot = (player.getRotation() + 90.0F) * Math.PI / 180.0D;
  3.         double x = Math.sin(pitch) * Math.cos(rot);
  4.         double y = Math.sin(pitch) * Math.sin(rot);
  5.         double z = Math.cos(pitch);
  6.         Location loc = new Location(x+1, player.getY(), y);
  7.         player.teleportTo(loc);
Advertisement
Add Comment
Please, Sign In to add comment