Hi, sorry for posting so many threads in the last few days but after this my plugin should be done I have a config file which looks like this ___ judge: steve ... How can i get the name from config and teleport that player to a specified xyz I tried PHP: $player = $Config->get("judge);$player->teleport(new position(x, y, z)); That however didnt work and gave a error anout something to do with string. I can get the exact error if needed Any help would be much appreciated
Because you are trying to teleport a string. Altough you forgot a ' " ' and case sensitive PHP: use pocketmine\level\Position;if(is_null($this->getServer()->getPlayer($this->getConfig()->get("judge")))) return false;//If player doesn't exists$this->getServer()->getPlayer($this->getConfig()->get("judge"))->teleport(new Position($x, $y, $z, $level));//Position requires also a level object