New Player::getSpawn()

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-16 18:05:05 +02:00
parent 66322d7719
commit 9dd1568c40
2 changed files with 5 additions and 1 deletions

View File

@ -157,7 +157,7 @@ class PlayerAPI{
}
$spawn = $lv->getSpawn();
}else{
$spawn = $this->server->api->level->getDefault()->getSpawn();
$spawn = $issuer->getSpawn();
}
$issuer->teleport($spawn);

View File

@ -94,6 +94,10 @@ class Player{
console("[DEBUG] New Session started with ".$ip.":".$port.". MTU ".$this->MTU.", Client ID ".$this->clientID, true, true, 2);
}
public function getSpawn(){
return $this->spawnPosition;
}
public function setSpawn(Vector3 $pos){
if(!($pos instanceof Level)){
$level = $this->level;