Solved Y Level Test

Discussion in 'Spigot Plugin Development' started by MrChickenSteve, Jul 9, 2018.

  1. So, i want to test if a player is at a certain Y level, i know how to test if they're above or below
    (Etheir if (player.getLocation().getY() > 55) ==OR== if (player.getLocation().getY() < 55)
    but i want to test for an EXACT Y level, how do i do this?
     
  2. Use == and location#getBlockY() :D
     
  3. Oh okay, works. i knew it was simple i just didn't know what to google
     
  4. JanTuck

    Supporter

    What? This is very basic java.
     
  5. Yeah, but i'm VERY new to it
     
  6. Not even basic Java. It's basic programming in general :S
     
    • Agree Agree x 1