Skip to content

BlockGrowEvent ​

class · pocketmine\event\block\BlockGrowEvent · source

Extends pocketmine\event\block\BaseBlockChangeEvent

Called when plants or crops grow.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\block\Block $block, \pocketmine\block\Block $newState, ?\pocketmine\player\Player $player = null)

getPlayer() ​

php
public function getPlayer() : ?\pocketmine\player\Player

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

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