change scheduler to internal

This commit is contained in:
Josh North 2018-07-17 10:30:34 -04:00
parent 722a3be90c
commit 294a2ed769

View File

@ -92,7 +92,7 @@ class Loader extends PluginBase{
return;
}else{
$timer--;
$this->getServer()->getScheduler()->scheduleDelayedTask(new CallbackTask([$this,"initial_start" ], [$timer]), 20);
$this->getScheduler()->scheduleDelayedTask(new CallbackTask([$this,"initial_start" ], [$timer]), 20);
}
}
@ -109,7 +109,7 @@ class Loader extends PluginBase{
if($time_target < $this->restart_time){
$this->db->updateTimestamp();
}
$this->getServer()->getScheduler()->scheduleDelayedTask(new CallbackTask([$this,"start" ], [$time_target]), 1200);
$this->getScheduler()->scheduleDelayedTask(new CallbackTask([$this,"start" ], [$time_target]), 1200);
}
public function count_down($seconds){
@ -125,7 +125,7 @@ class Loader extends PluginBase{
if($seconds == 30) $this->broadcast("Server will restart in $seconds seconds.");
if($seconds == 10) $this->broadcast("Server will restart in $seconds seconds.");
if($seconds < 6) $this->broadcast("Server will restart in $seconds.");
$this->getServer()->getScheduler()->scheduleDelayedTask(new CallbackTask([$this,"count_down" ], [$seconds]), 20);
$this->getScheduler()->scheduleDelayedTask(new CallbackTask([$this,"count_down" ], [$seconds]), 20);
}
}