Ive noticed that when you cancell the BlockBreakEvent, the block still breaks for about a split second then reappears. How do I cancel it before the block actually breaks? I've seen it on a few servers so i know its possible.
If you want cancel this, try: PHP: public function onInteract(PlayerInteractEvent $ev){//Here, you can write something...$ev->setCancelled(true);} This is only full feature working (if you don't want use Adventure mode). Unfortunally, it could cancell all touching (So, if you use this for cancelling breaking doors, player can't be able to open/close them)
I already know how to cancel events. I thought that there was a way to cancel the BlockBreakEvent before the block actually breaks but @iJoshuaHD's suggestion of adventure mode is working fine.