Detect if player has direct exposure to sky?

Discussion in 'Plugin Development' started by HaitherecreeperMC, Dec 4, 2013.

Thread Status:
Not open for further replies.
  1. Hello, so as the title explains, all I want is an if statement detecting if the player has direct exposure to the sky.

    Thanks!
     
  2. Offline

    Rocoty

    Check if the player's position is above the player's XZ-position's top block.
     
  3. I'm sorry... I'm such a noob, how would I do that?
     
  4. Offline

    phillmac

    I don't know the answer exactly but from what I understand you would have to get the players co-ordinates and then use the function getHighestBlockAt(int x, int z) with the block they are standing on, and then compare the result to see if the player is on or above the highest block.
     
  5. Offline

    Garris0n

Thread Status:
Not open for further replies.

Share This Page