mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
Fixed ServerScheduler::addTask() period
This commit is contained in:
@@ -168,10 +168,10 @@ class ServerScheduler{
|
|||||||
$delay = -1;
|
$delay = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($period === 1){
|
if($period < -1){
|
||||||
$period = 1;
|
|
||||||
}elseif($period < -1){
|
|
||||||
$period = -1;
|
$period = -1;
|
||||||
|
}elseif($period < 1){
|
||||||
|
$period = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->handle(new TaskHandler($task, $this->nextId(), $delay, $period));
|
return $this->handle(new TaskHandler($task, $this->nextId(), $delay, $period));
|
||||||
@@ -237,4 +237,4 @@ class ServerScheduler{
|
|||||||
return $this->ids++;
|
return $this->ids++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user