Is there a way I can call for more then 1 block item instead of starting a hole new function for the block? public function onBreak(BlockBreakEvent $event){ $block = $event->getBlock(); $dropItems = $event->getDrops(); if($block->getId() == 16){ //set block coal $event->setCancelled(); $world = $block->getLevel(); foreach ($dropItems as $item){ $world->dropItem($block, $item); } $world->setBlock($block, BlockFactory::get(0, 0, null)); //sets the block to air $this->getScheduler()->scheduleDelayedTask(new sample($this, $block), 20 * 3 ); } }
You're doing better than most people here who are "new" to php! Well done. Of course, assuming that you solved it yourself by actually understanding what I said!
Thank you! I have watched a 5 hour php course video, then watch recap videos to refresh my memory. Thanks for the help!