mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Implemented Level::getSafeSpawn()
This commit is contained in:
@ -53,7 +53,7 @@ class LevelAPI{
|
||||
$this->generateLevel($this->default, $this->server->seed);
|
||||
$this->loadLevel($this->default);
|
||||
}
|
||||
$this->server->spawn = $this->getDefault()->getSpawn();
|
||||
$this->server->spawn = $this->getDefault()->getSafeSpawn();
|
||||
}
|
||||
|
||||
public function commandHandler($cmd, $params, $issuer, $alias){
|
||||
|
@ -269,7 +269,7 @@ class PlayerAPI{
|
||||
$origin = $this->get($name);
|
||||
if($origin instanceof Player){
|
||||
$name = $origin->username;
|
||||
return $origin->teleport($lv->getSpawn());
|
||||
return $origin->teleport($lv->getSafeSpawn());
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user