PHP: public function drawPlot($sender, $faction, $x, $y, $z, $level, $size) { $arm = ($size - 1) / 2; $block = new Snow(); if ($this->cornerIsInPlot($x + $arm, $z + $arm, $x - $arm, $z - $arm)) { $claimedBy = $this->factionFromPoint($x, $z); $power_claimedBy = $this->getFactionPower($claimedBy); $power_sender = $this->getFactionPower($faction); if ($this->prefs->get("EnableOverClaim")) { if ($power_sender < $power_claimedBy) { $sender->sendMessage($this->formatMessage("§cYou don't have enough power to overclaim this plot.")); } else { $sender->sendMessage($this->formatMessage("§bYou have enough STR power to overclaim this plot! Now, Type §3/f overclaim to overclaim this plot if you want.")); } return false; } else { $sender->sendMessage($this->formatMessage("§2Overclaiming is disabled.")); return false; } } $level->setBlock(new Vector3($x + $arm, $y, $z + $arm), $block); $level->setBlock(new Vector3($x - $arm, $y, $z - $arm), $block); $this->newPlot($faction, $x + $arm, $z + $arm, $x - $arm, $z - $arm); return true; } err PHP: Could not pass event 'pocketmine\event\player\PlayerMoveEvent' to 'FactionsPro v2.0.0-implement': Call to a member function setBlock() on string on FactionsPro\FactionListener[20:20:07] [Server thread/CRITICAL]: Error: "Call to a member function setBlock() on string" (EXCEPTION) in "FactionsPro-master/src/FactionsPro/FactionMain" at line 369
As the error told you, the $level var is a string so you should var_dump() it to check what it is. I assume that it's the level name so just get the Level instance to fix that PHP: $this->getServer()->getLevelByName($level)->setBlock();