pocketmine\block\Fallable::place PHP Method

place() public method

public place ( Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null )
$item pocketmine\item\Item
$block Block
$target Block
$player pocketmine\Player
    public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null)
    {
        $ret = $this->getLevel()->setBlock($this, $this, true, true);
        return $ret;
    }

Usage Example

 public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null)
 {
     parent::place($item, $block, $target, $face, $fx, $fy, $fz, $player);
     $this->getLevel()->addSound(new AnvilFallSound($this));
 }