hello, does someone know how to get the location of the block where the sign is on.(on the side) thanks.
Do you use an Event for this? Code:java Block getBlockBelow = event.getPlayer().getWorld().getBlockAt(event.getPlayer().getLocation().getBlockX(),event.getPlayer().getLocation().getBlockY() -1,event.getPlayer().getLocation().getBlockZ()); In this case getBlockBelow.getType() will tell you which kind of Block under your Block is. This could be used for e.g. in a BlockBreakEvent or something where you interact with the Block above the requested one.
thanks but how do i get a sign that is on the side of a block and not on top of a block EDIT by Moderator: merged posts, please use the edit button instead of double posting.
On top would be Material.SIGN_POST and on a wall would be Material.WALL_SIGN Code:java Block getBlockBelow = event.getPlayer().getWorld().getBlockAt(event.getPlayer().getLocation().getBlockX(),event.getPlayer().getLocation().getBlockY() -1,event.getPlayer().getLocation().getBlockZ());if (getBlockBelow.getType() == Material.WALL_SIGN) {// Your code here.}