PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
|
Public Member Functions | |
__construct (private \Closure $closure) | |
getHandler () | |
getName () | |
onCancel () | |
onRun () | |
setHandler (?TaskHandler $taskHandler) | |
Task implementation which allows closures to be called by a scheduler.
Example usage:
Definition at line 41 of file ClosureTask.php.
pocketmine\scheduler\ClosureTask::__construct | ( | private \Closure | $closure | ) |
\Closure | $closure | Must accept zero parameters @phpstan-param \Closure() : void $closure |
Definition at line 46 of file ClosureTask.php.
|
finalinherited |
@phpstan-return TaskHandler<static>|null
Definition at line 35 of file Task.php.
Referenced by pocketmine\scheduler\TaskHandler\__construct().
pocketmine\scheduler\ClosureTask::getName | ( | ) |
Reimplemented from pocketmine\scheduler\Task.
Definition at line 52 of file ClosureTask.php.
|
inherited |
pocketmine\scheduler\ClosureTask::onRun | ( | ) |
Actions to execute when run
CancelTaskException |
Reimplemented from pocketmine\scheduler\Task.
Definition at line 56 of file ClosureTask.php.
|
finalinherited |