pocketmine\event\block\BlockPlaceEvent::__construct PHP Метод

__construct() публичный Метод

public __construct ( Player $player, Block $blockPlace, Block $blockReplace, Block $blockAgainst, Item $item )
$player pocketmine\Player
$blockPlace pocketmine\block\Block
$blockReplace pocketmine\block\Block
$blockAgainst pocketmine\block\Block
$item pocketmine\item\Item
    public function __construct(Player $player, Block $blockPlace, Block $blockReplace, Block $blockAgainst, Item $item)
    {
        $this->block = $blockPlace;
        $this->blockReplace = $blockReplace;
        $this->blockAgainst = $blockAgainst;
        $this->item = $item;
        $this->player = $player;
    }

Usage Example

 public function __construct(TreadFarmlandPlayer $player, Block $farmland)
 {
     $blockPlace = Block::get(Block::DIRT);
     $blockPlace->position($farmland);
     parent::__construct($player, $blockPlace, $farmland, $farmland, Item::get(0, 0, 0));
 }