Use PlayerJoinEvent. PHP: public function onJoin(PlayerJoinEvent $event) { $player = $event->getPlayer(); $player->teleport(new Vector3($player->x, $player->y + 2, $player->z)); //I don't know how to teleport to specific Coords. } A developer should correct me if I'm wrong.
In the handler of PlayerJoinEvent, call $player->teleport() with new Position(122, 26, 56, $level) where $level is defined by $server->getLevelByName("iCraftServer") You aren't answering to this thread.
I am just trying to help. I also said that other developers should correct me and give the right answer.
He is asking how to cook pork, and you are telling him how to cook fish. Although they have something in common, do you think it helps in any ways?
Then you're the best and everyone should not do things that you do not agree. :| Edit: And you should answer his thread before me to prevent other 'incorrect help' .
If you don't know how to help, don't try to help by putting something not very relevant here. It seems that you think helping people code is just copying stuff from everywhere.
If you understood what you sent, to wouldn't have put that nonsense $player->x there. If you understood, you would have put $player->x there but directly the numbers. OK I can't blame you. Your whole concept is wrong. You don't even know which parts are learning and which parts are copying. You don't even know which part is the function and which part is the arguments. Because if you understood, you would have known what $player->x was there for.
Dont try to teleport a Player in the Join/prelogin event, because the MCPE-Client changed how it spawns. Its currently not possible to teleport a in these Events.