mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 05:15:13 +00:00
Level: fixed global packet mechanism spamming empty batch packets every tick
This also spammed to nobody when the level is empty. Closes #2020.
This commit is contained in:
parent
3600542d78
commit
cacd0f5d8f
@ -823,8 +823,10 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
$this->checkSleep();
|
$this->checkSleep();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->server->batchPackets($this->players, $this->globalPackets);
|
if(!empty($this->players) and !empty($this->globalPackets)){
|
||||||
$this->globalPackets = [];
|
$this->server->batchPackets($this->players, $this->globalPackets);
|
||||||
|
$this->globalPackets = [];
|
||||||
|
}
|
||||||
|
|
||||||
foreach($this->chunkPackets as $index => $entries){
|
foreach($this->chunkPackets as $index => $entries){
|
||||||
Level::getXZ($index, $chunkX, $chunkZ);
|
Level::getXZ($index, $chunkX, $chunkZ);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user