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