mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
add NetworkSession->onEnterWorld() hook
This commit is contained in:
parent
3a41a798ad
commit
122238d57e
@ -797,6 +797,12 @@ class NetworkSession{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onEnterWorld() : void{
|
||||||
|
$world = $this->player->getWorld();
|
||||||
|
$world->sendTime($this->player);
|
||||||
|
$world->sendDifficulty($this->player);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return InventoryManager
|
* @return InventoryManager
|
||||||
*/
|
*/
|
||||||
|
@ -811,8 +811,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
|||||||
|
|
||||||
$this->usedChunks = [];
|
$this->usedChunks = [];
|
||||||
$this->loadQueue = [];
|
$this->loadQueue = [];
|
||||||
$this->getWorld()->sendTime($this);
|
$this->networkSession->onEnterWorld();
|
||||||
$this->getWorld()->sendDifficulty($this);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user