fixed #3702 and fix for setting timezone from php.ini

This commit is contained in:
Intyre
2015-12-19 23:58:05 +01:00
parent 261ce1ba8b
commit c1a484ee5c
2 changed files with 15 additions and 5 deletions

View File

@ -3375,9 +3375,16 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
return true;
}
/**
* @param Vector3|Position|Location $pos
* @param float $yaw
* @param float $pitch
*
* @return bool
*/
public function teleport(Vector3 $pos, $yaw = null, $pitch = null){
if(!$this->isOnline()){
return;
return false;
}
$oldPos = $this->getPosition();
@ -3398,11 +3405,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->spawnToAll();
}
$this->resetFallDistance();
$this->nextChunkOrderRun = 0;
$this->newPosition = null;
return true;
}
return false;
}
/**