mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 03:06:55 +00:00
AsyncPool: Remove Server dependency (API breaks included)
This brings two plugin-breaking changes: AsyncTask->onCompletion() and AsyncTask->onProgressUpdate() no longer accept Server parameters. This now allows for the functionality of AsyncPool and AsyncTask to be tested outside of a Server.
This commit is contained in:
@ -26,7 +26,6 @@ namespace pocketmine\level\light;
|
||||
use pocketmine\level\format\Chunk;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\scheduler\AsyncTask;
|
||||
use pocketmine\Server;
|
||||
|
||||
class LightPopulationTask extends AsyncTask{
|
||||
|
||||
@ -48,7 +47,7 @@ class LightPopulationTask extends AsyncTask{
|
||||
$this->chunk = $chunk->fastSerialize();
|
||||
}
|
||||
|
||||
public function onCompletion(Server $server){
|
||||
public function onCompletion() : void{
|
||||
/** @var Level $level */
|
||||
$level = $this->fetchLocal();
|
||||
if(!$level->isClosed()){
|
||||
|
Reference in New Issue
Block a user