From 75e1b63c1e510eee53948355f5d967aac1449b63 Mon Sep 17 00:00:00 2001 From: Josh North Date: Thu, 7 Jun 2018 08:17:40 -0400 Subject: [PATCH] Update 'RealTime/src/RealTime/MainClass.php' --- RealTime/src/RealTime/MainClass.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/RealTime/src/RealTime/MainClass.php b/RealTime/src/RealTime/MainClass.php index 0c31f1b..0e50702 100644 --- a/RealTime/src/RealTime/MainClass.php +++ b/RealTime/src/RealTime/MainClass.php @@ -13,9 +13,6 @@ use pocketmine\event\Listener; use pocketmine\level\Level; use pocketmine\utils\Config; use pocketmine\scheduler\CallbackTask; -use pocketmine\scheduler\PluginTask; -use pocketmine\scheduler\TaskScheduler; -use pocketmine\scheduler\Task; class MainClass extends PluginBase implements Listener{ @@ -72,12 +69,12 @@ $test = date('H') + ($modify); } $this->getLogger()->info(TextFormat::DARK_GREEN ."[RealTime] It is " . $test. " (20h is same as 8pm)"); - $this->getServer()->getScheduler()->scheduleRepeatingTask(new changeTimeTask($this), 120); + $this->getPlugin()->getScheduler()->scheduleRepeatingTask(new changeTimeTask($this), 120); $this->changeTime(); if ($tTime == true) { $this->getLogger()->info($tTimeInterval); - $this->getServer()->getScheduler()->scheduleRepeatingTask(new tellTimeTask($this), $tTimeInterval); + $this->getPlugin()->getScheduler()->scheduleRepeatingTask(new tellTimeTask($this), $tTimeInterval); $this->tellTime(); }