Solved how to teleport in centre of block

Discussion in 'Plugin Development' started by johnny_boy, Feb 11, 2018.

Thread Status:
Not open for further replies.
  1. Title basically says it all, if it helps this is how I'm saving the coordinates, but when I teleport the player to the coordinates, if it's by a wall, they will glitch into the wall then back onto the block, taking 0.5 hearts of damage.. Really annoying.
    Code:
    Location playerLoc = pl.getLocation();
                      
    x = playerLoc.getBlockX();
    y = playerLoc.getBlockY();
    z = playerLoc.getBlockZ();
     
  2. Offline

    timtower Administrator Moderator

  3. Thank you. Solved.
     
  4. Offline

    Nostos

Thread Status:
Not open for further replies.

Share This Page