mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
NetworkSession: don't crash on teleporting to other world during PlayerLoginEvent
This commit is contained in:
parent
5324474194
commit
f9bfc0df73
@ -942,11 +942,13 @@ class NetworkSession{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onEnterWorld() : void{
|
public function onEnterWorld() : void{
|
||||||
$world = $this->player->getWorld();
|
if($this->player !== null){
|
||||||
$this->syncWorldTime($world->getTime());
|
$world = $this->player->getWorld();
|
||||||
$this->syncWorldDifficulty($world->getDifficulty());
|
$this->syncWorldTime($world->getTime());
|
||||||
//TODO: weather needs to be synced here (when implemented)
|
$this->syncWorldDifficulty($world->getDifficulty());
|
||||||
//TODO: world spawn needs to be synced here
|
//TODO: weather needs to be synced here (when implemented)
|
||||||
|
//TODO: world spawn needs to be synced here
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function syncWorldTime(int $worldTime) : void{
|
public function syncWorldTime(int $worldTime) : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user