PHP: $x = $playercfg->get("spawn-x");$playercfg = new Config($this->main->getDataFolder() . "players/" . $p->getName() . ".yml", Config::YAML);$y = $playercfg->get("spawn-y");$z = $playercfg->get("spawn-z");$p->teleport(new Vector3($x, $y, $z), "Arena"); error: Code: [21:16:14] [Server thread/CRITICAL]: Could not execute task test\Task: Call to a member function get() on unknown [21:16:14] [Server thread/CRITICAL]: Error: "Call to a member function get() on unknown" (EXCEPTION) in "/test/src/test/Main" at line 335 What is bad? spawn-y, spawn-x, spawn-z exist in playercfg.
Move the line where $x is defined under the line where the config is defined. You define a variable before a variable which it uses ($playercfg) is defined.