mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +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:
@ -25,7 +25,6 @@ namespace pmmp\TesterPlugin\tests;
|
||||
|
||||
use pmmp\TesterPlugin\Test;
|
||||
use pocketmine\scheduler\AsyncTask;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\utils\MainLogger;
|
||||
|
||||
class AsyncTaskMainLoggerTest extends Test{
|
||||
@ -49,7 +48,7 @@ class AsyncTaskMainLoggerTest extends Test{
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
public function onCompletion(Server $server){
|
||||
public function onCompletion(){
|
||||
/** @var AsyncTaskMainLoggerTest $test */
|
||||
$test = $this->fetchLocal();
|
||||
$test->setResult($this->success ? Test::RESULT_OK : Test::RESULT_FAILED);
|
||||
|
Reference in New Issue
Block a user