RAEADME!!! Hi there,i make a UI with FormAPI,and its about WorldUI.when player type word in input.And player click submit after type.It will automatic create a world with the name player type and tp player to that world.But.I dont know how to let people tp to that world. Please help me,thank you README!!!
Like i want to let people tp to otheres world by using $level->??? or $player->??? such Thing i dont know how to write it.
PHP: $levelName = "blah";if ($this->getServer()->getLevelByName($levelName) === null) { $this->getServer()->loadLevel($levelName);}$level = $this->getServer()->getLevelByName($levelName);$x = 0;$y = 0;$z = 0;$player->teleport(new Position($x, $y, $z, $level));
Ohhh,thx dude.I have last problem.Like example of this(below) PHP: $player->sendMessage("§l§a» §rEntering World§b " . $data[1] . "§r..."); $this->getServer()->dispatchCommand(new ConsoleCommandSender(), "mw create " . $data[1] . " 0 FLAT" ); $this->getServer()->loadLevel($data[1]); $player->teleport(Server::getInstance()->getLevelbyName($data[1])->getSafeSpawn()); Can i make a delay between the $this->getServer()->loadLevel($data[1]); and $player->teleport(Server::getInstance()->getLevelbyName($data[1])->getSafeSpawn());?
Cause It will make my server crash,if i dont make a time delay on them.Please just tell me how.Thank you