mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +00:00
New Player::getSpawn()
This commit is contained in:
parent
66322d7719
commit
9dd1568c40
@ -157,7 +157,7 @@ class PlayerAPI{
|
||||
}
|
||||
$spawn = $lv->getSpawn();
|
||||
}else{
|
||||
$spawn = $this->server->api->level->getDefault()->getSpawn();
|
||||
$spawn = $issuer->getSpawn();
|
||||
}
|
||||
|
||||
$issuer->teleport($spawn);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user