mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
TaskScheduler: remove redundant else branch
This commit is contained in:
parent
f2b8d6879f
commit
6b4b4e4bb1
@ -197,13 +197,12 @@ class TaskScheduler{
|
||||
if($task->isCancelled()){
|
||||
unset($this->tasks[$task->getTaskId()]);
|
||||
continue;
|
||||
}else{
|
||||
try{
|
||||
$task->run($this->currentTick);
|
||||
}catch(\Throwable $e){
|
||||
$this->logger->critical("Could not execute task " . $task->getTaskName() . ": " . $e->getMessage());
|
||||
$this->logger->logException($e);
|
||||
}
|
||||
}
|
||||
try{
|
||||
$task->run($this->currentTick);
|
||||
}catch(\Throwable $e){
|
||||
$this->logger->critical("Could not execute task " . $task->getTaskName() . ": " . $e->getMessage());
|
||||
$this->logger->logException($e);
|
||||
}
|
||||
if($task->isRepeating()){
|
||||
$task->setNextRun($this->currentTick + $task->getPeriod());
|
||||
|
Loading…
x
Reference in New Issue
Block a user