spigot get block player is looking at code example
Example 1: get block player is looking at bukkit
Player player = (Player) sender;
Block block = player.getTargetBlock(null, 100);
Location bl = block.getLocation();
Example 2: Spigot how to get block player is looking at
player.getTargetBlock(null, 200);