mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +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:
@ -24,9 +24,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\updater;
|
||||
|
||||
|
||||
use pocketmine\scheduler\AsyncTask;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\utils\Internet;
|
||||
|
||||
class UpdateCheckTask extends AsyncTask{
|
||||
@ -72,7 +70,7 @@ class UpdateCheckTask extends AsyncTask{
|
||||
}
|
||||
}
|
||||
|
||||
public function onCompletion(Server $server){
|
||||
public function onCompletion(){
|
||||
/** @var AutoUpdater $updater */
|
||||
$updater = $this->fetchLocal();
|
||||
if($this->hasResult()){
|
||||
|
Reference in New Issue
Block a user