Skip to content

StructureGrowEvent ​

class · pocketmine\event\block\StructureGrowEvent · source

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\Player

It returns the player which grows the structure. It returns null when the structure grows by itself.

getTransaction() ​

php
public function getTransaction() : \pocketmine\world\BlockTransaction

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.