mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Task: Remove currentTick parameter (#3498)
This parameter is not used for the vast majority of task use cases and just serves as extra useless boilerplate code, especially for closure-based tasks. This use case can be replaced using Server->getTick() in the cases where it matters.
This commit is contained in:
@ -147,7 +147,7 @@ class TaskScheduler{
|
||||
unset($this->tasks[$task->getTaskId()]);
|
||||
continue;
|
||||
}
|
||||
$task->run($this->currentTick);
|
||||
$task->run();
|
||||
if($task->isRepeating()){
|
||||
$task->setNextRun($this->currentTick + $task->getPeriod());
|
||||
$this->queue->insert($task, $this->currentTick + $task->getPeriod());
|
||||
|
Reference in New Issue
Block a user