mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 03:35:33 +00:00
Player: move some respawn net sync logic to NetworkSession
This commit is contained in:
parent
3c677bd3ec
commit
92e81e3298
@ -2530,12 +2530,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
$attr->resetToDefault();
|
||||
}
|
||||
|
||||
$this->sendData($this);
|
||||
$this->sendData($this->getViewers());
|
||||
|
||||
$this->networkSession->syncAdventureSettings($this);
|
||||
$this->networkSession->syncAllInventoryContents();
|
||||
|
||||
$this->spawnToAll();
|
||||
$this->scheduleUpdate();
|
||||
|
||||
|
@ -586,6 +586,11 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
public function onRespawn() : void{
|
||||
$this->player->sendData($this->player);
|
||||
$this->player->sendData($this->player->getViewers());
|
||||
|
||||
$this->syncAdventureSettings($this->player);
|
||||
$this->syncAllInventoryContents();
|
||||
$this->setHandler(new InGameSessionHandler($this->player, $this));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user