So, Hello i want to make a setDrops for beetroot seeds. I had make a setDrops() but it's give creeper baneer ! Instead of beetroot x) My code : PHP: <?phpnamespace Fritures\ItemCore\Ajouts;use Fritures\ItemCore\Main;use pocketmine\Player;use pocketmine\item\Item;use pocketmine\event\Listener;use pocketmine\event\block\BlockBreakEvent;class WeedSeed implements Listener { private $plugin = null; public function __construct(Main $plugin){ $this->plugin = $plugin; } public function getPlugin() : ?Main { return $this->plugin; } public function onBreak(BlockBreakEvent $event){ $block = $event->getBlock(); if($block->getId() == 244){ if($block->getDamage() >= 7){ /*$event->setDrops([Item::get(434,0,1)]);*/ } } }}?>
if you used constants instead of magic numbers you might have a better idea why the code isn't working (or maybe it wouldn't be broken to begin with).