Distance of the player to the ground

Discussion in 'Spigot Plugin Development' started by LuckyChicken, May 21, 2017.

  1. How can I get the distance of the player to the ground?
    Whats the best way to do this?
     
    • Get player's Y-coordinate
    • From the player's location, loop/iterate downwards to search for a solid block. Once a solid block has been found, get the Y-coordinate of the block and add 1 (or a value between 0 to 1, depending on the block's height)
    • Find difference.