If you click on air, the PlayerInteractEvent is fired. So if you do some ray casting and find the block they are aiming at. This is far from perfect and I doubt it would satisfy your use case. But that is all I can think of off the top of my head.
^what falk said. You can accomplish it by using Player::getTargetBlock(distance) and firing PlayerInteractEvent; distance being the number of blocks. PHP: public function onInteract(PlayerInteractEvent $event){ if($event->getAction() === PlayerInteractEvent::LEFT_CLICK_AIR){ $player = $event->getPlayer(); $maxdistance = 10; $block = $player->getTargetBlock($maxdistance); if($block->getId() !== Block::AIR){ $player->getServer()->getPluginManager()->callEvent(new PlayerInteractEvent( $player, $player->getInventory()->getItemInHand(), $block, $event->getFace(), PlayerInteractEvent::LEFT_CLICK_BLOCK )); } }} But it won't work as it should be, I don't think that will allow player's to break blocks as far as 10m.
Block breaking is possible, but it must be instabreak. Also note that merely calling the event doesn't really simulate block clicking. (Simulate or emulate?)