Solved Get cursor location?

Discussion in 'Plugin Development' started by HeadGam3z, Jun 4, 2014.

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

    HeadGam3z

    Is there any way of getting a cursor location?

    I'm trying to check if a player can build in an area with WorldGuard's API. So if a player is standing outside of a region where (s)he can build, but (s)he is trying to place a block in a region where (s)he can not build, my plugins says "Can build!" but, that's only because (s)he's outside of the build deny region while trying to place a block in a build deny region.

    I was using
    Code:java
    1. if (getWorldGuard().canBuild(player, player.getLocation()))

    But I need to get the cursor location to check if they can build where they are looking at if possible instead of where they are standing.
     
  2. Offline

    Ultimate_n00b

    player.getTargetBlock(null, 6) then checking if it's in the region?
     
  3. Offline

    Necrodoom

    If using block place event, use the block location Instead.​
     
    HeadGam3z likes this.
Thread Status:
Not open for further replies.

Share This Page