mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Level formats can send chunks without creating an AsyncTask, API 1.2.1 (small fix, no changes)
This commit is contained in:
@ -63,6 +63,7 @@ use pocketmine\network\protocol\SetTimePacket;
|
||||
use pocketmine\network\protocol\UpdateBlockPacket;
|
||||
use pocketmine\Player;
|
||||
use pocketmine\plugin\Plugin;
|
||||
use pocketmine\scheduler\AsyncTask;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\tile\Sign;
|
||||
use pocketmine\tile\Spawnable;
|
||||
@ -1411,9 +1412,11 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
unset($this->chunkSendQueue[$index]);
|
||||
}else{
|
||||
$task = $this->provider->requestChunkTask($x, $z);
|
||||
$this->server->getScheduler()->scheduleAsyncTask($task);
|
||||
$this->chunkSendTasks[$index] = true;
|
||||
$task = $this->provider->requestChunkTask($x, $z);
|
||||
if($task instanceof AsyncTask){
|
||||
$this->server->getScheduler()->scheduleAsyncTask($task);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user