mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
TaskScheduler: adjust disabled scheduler exception
This commit is contained in:
parent
15270f8329
commit
60212cef2f
@ -147,7 +147,7 @@ class TaskScheduler{
|
|||||||
*/
|
*/
|
||||||
private function addTask(Task $task, int $delay, int $period){
|
private function addTask(Task $task, int $delay, int $period){
|
||||||
if(!$this->enabled){
|
if(!$this->enabled){
|
||||||
throw new \InvalidStateException("Tried to schedule task after scheduler shutdown");
|
throw new \InvalidStateException("Tried to schedule task to disabled scheduler");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($delay <= 0){
|
if($delay <= 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user