diff --git a/src/pocketmine/block/Sugarcane.php b/src/pocketmine/block/Sugarcane.php index cdda01f8e..a8fa2e8f1 100644 --- a/src/pocketmine/block/Sugarcane.php +++ b/src/pocketmine/block/Sugarcane.php @@ -87,7 +87,12 @@ class Sugarcane extends Flowable{ for($y = 1; $y < 3; ++$y){ $b = $this->getLevelNonNull()->getBlockAt($this->x, $this->y + $y, $this->z); if($b->getId() === self::AIR){ - $this->getLevelNonNull()->setBlock($b, BlockFactory::get(Block::SUGARCANE_BLOCK), true); + $ev = new BlockGrowEvent($b, BlockFactory::get(Block::SUGARCANE_BLOCK)); + $ev->call(); + if($ev->isCancelled()){ + break; + } + $this->getLevelNonNull()->setBlock($b, $ev->getNewState(), true); break; } }