mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-20 04:33:59 +00:00
World: fix time sync
This commit is contained in:
parent
aac017eae4
commit
d40152e3bb
@ -629,6 +629,9 @@ class World implements ChunkManager{
|
|||||||
* @param Player ...$targets If empty, will send to all players in the world.
|
* @param Player ...$targets If empty, will send to all players in the world.
|
||||||
*/
|
*/
|
||||||
public function sendTime(Player ...$targets) : void{
|
public function sendTime(Player ...$targets) : void{
|
||||||
|
if(count($targets) === 0){
|
||||||
|
$targets = $this->players;
|
||||||
|
}
|
||||||
foreach($targets as $player){
|
foreach($targets as $player){
|
||||||
$player->getNetworkSession()->syncWorldTime($this->time);
|
$player->getNetworkSession()->syncWorldTime($this->time);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user