mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 14:05:35 +00:00
Fixed ServerScheduler::addTask() period
This commit is contained in:
parent
32f67d7187
commit
8b2440ff96
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user