Cancel the BlockBreakEvent if Bedrock gets broken in level/world called lvl1: PHP: public function onBlockBreakEvent(BlockBreakEvent $event) { $block = $event->getBlock(); // gets the broken block if($block->getLevel()->getName() === "lvl1") { // checks if the block’s level/world is “lvl1” if($block->getId() === Block::BEDROCK) { // if the broken block is bedrock $event->setCancelled(); // cancels the event, player cannot break bedrock } }}