$this->getServer()->getLevelByName("world")->addParticle(new HeartParticle(new Vector3($x, $y, $z)));
Mind that you won't always be using the code from the main class. If you have the Level object: PHP: $level->addParticle(new \pocketmine\level\particle\HeartParticle(new \pocketmine\math\Vector3($x, $y, $z));
Since there is only one HeartParticle class and one Vector3 class, you don't need to specify it as there is no confusion.