Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Load Level

Comments in 'Plugin Development' started by Marcelo234, Jan 24, 2016.

  1. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204
    Hey guys i need some help...Why this won't work?
    Code:
    PHP:
    public function onEnable(){
    $this->lobbyconfig = new config($this->getDataFolder() . "config.yml"Config::YAML, array());
            
    $this->getServer()->loadLevel($this->lobbyconfig->get("lobby_spawn_world"));
    }
    "conig.yml"
    Code:
    ---
    loby_spawn_world: "McKaff"
    lobby_spawn_x: 134.400000
    lobby_spawn_y: 4.000000
    lobby_spawn_z: 124.600000
    ...
    ERROR:_
    Code:
    [08:43:52] [Server thread/CRITICAL]: pocketmine\utils\LevelException: "Invalid empty level name" (EXCEPTION) in "/src/pocketmine/Server__32bit" at line 1057
    
    Level WorldName is McKaff

    Thx
  2. Bluplayz
    Offline

    Bluplayz Active Member

    Joined:
    Aug 20, 2015
    Posts:
    74
    Minecraft User:
    Bluplayz
    Check the config ... You write "loby" you load "lobby" xD there a mistake :D
    KubixQ and Vaivez66 like this.
  3. Marcelo234
    Offline

    Marcelo234 New Member

    Joined:
    Oct 18, 2014
    Posts:
    204

Share This Page

Advertisement