Fixed error with world teleporting

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-15 17:40:39 +02:00
parent de5be4168d
commit cef4347a02
4 changed files with 14 additions and 4 deletions

View file

@ -50,7 +50,6 @@ class LevelAPI{
$this->loadLevel($this->default);
}
$this->server->spawn = $this->getDefault()->getSpawn();
$this->loadLevel("other");
}
public function generateLevel($name, $seed = false){
@ -69,6 +68,9 @@ class LevelAPI{
}
public function loadLevel($name){
if($this->get($name) !== false){
return false;
}
$path = DATA_PATH."worlds/".$name."/";
if(!file_exists($path."level.pmf")){
$level = new LevelImport($path);