StructureGrowEvent
Extends BlockEvent
Implements Cancellable
Called when structures such as Saplings or Bamboo grow. These types of plants tend to change multiple blocks at once upon growing.
Methods
__construct()
php
public function __construct(\pocketmine\block\Block $block, \pocketmine\world\BlockTransaction $transaction, ?\pocketmine\player\Player $player)getPlayer()
php
public function getPlayer() : ?\pocketmine\player\PlayerIt returns the player which grows the structure. It returns null when the structure grows by itself.
getTransaction()
php
public function getTransaction() : \pocketmine\world\BlockTransaction