Solved Teleport the player one block back?

Discussion in 'Plugin Development' started by elementalgodz11, Jan 25, 2014.

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

    elementalgodz11

  2. Offline

    RainoBoy97

    If you leave your original post, and dont delete it others may take use of your solution later :)
     
    DAZ3DNDC0NFUS3D likes this.
  3. Offline

    mine-care

    as RainoBoy97 yes it will be helpfull, please provide solution :/ im looking for it
     
  4. Offline

    Zupsub

    Untested:
    Code:
    Location l = Player#getLocation();
    Vector direc = l.getDirection().normalize();
    direc.setY(l.getY());
    direc.normalize();
    direc.multiply(-1);
    l.add(direc);
    
    Player#teleport(l.getBlock().getLocation());
    // or
    Player#teleport(l);
    
    
     
Thread Status:
Not open for further replies.

Share This Page