Merge branch '4.0' of Point808/PMMP_Plugins into master
This commit is contained in:
commit
aee6a7fb58
@ -69,12 +69,12 @@ $test = date('H') + ($modify);
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->getLogger()->info(TextFormat::DARK_GREEN ."[RealTime] It is " . $test. " (20h is same as 8pm)");
|
$this->getLogger()->info(TextFormat::DARK_GREEN ."[RealTime] It is " . $test. " (20h is same as 8pm)");
|
||||||
$this->getPlugin()->getScheduler()->scheduleRepeatingTask(new changeTimeTask($this), 120);
|
$this->getScheduler()->scheduleRepeatingTask(new changeTimeTask($this), 120);
|
||||||
$this->changeTime();
|
$this->changeTime();
|
||||||
|
|
||||||
if ($tTime == true) {
|
if ($tTime == true) {
|
||||||
$this->getLogger()->info($tTimeInterval);
|
$this->getLogger()->info($tTimeInterval);
|
||||||
$this->getPlugin()->getScheduler()->scheduleRepeatingTask(new tellTimeTask($this), $tTimeInterval);
|
$this->getScheduler()->scheduleRepeatingTask(new tellTimeTask($this), $tTimeInterval);
|
||||||
$this->tellTime();
|
$this->tellTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace RealTime;
|
namespace RealTime;
|
||||||
|
|
||||||
use pocketmine\scheduler\PluginTask;
|
use pocketmine\scheduler\Task;
|
||||||
|
|
||||||
class changeTimeTask extends PluginTask{
|
class changeTimeTask extends Task{
|
||||||
public $plugin;
|
public $plugin;
|
||||||
public function __construct($plugin){
|
public function __construct($plugin){
|
||||||
parent::__construct($plugin);
|
|
||||||
$this->plugin = $plugin;
|
$this->plugin = $plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
namespace RealTime;
|
namespace RealTime;
|
||||||
|
|
||||||
|
|
||||||
use pocketmine\scheduler\PluginTask;
|
use pocketmine\scheduler\Task;
|
||||||
|
|
||||||
class tellTimeTask extends PluginTask{
|
class tellTimeTask extends Task{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions to execute when run
|
* Actions to execute when run
|
||||||
@ -22,7 +22,6 @@ class tellTimeTask extends PluginTask{
|
|||||||
*/
|
*/
|
||||||
public $plugin;
|
public $plugin;
|
||||||
public function __construct($plugin){
|
public function __construct($plugin){
|
||||||
parent::__construct($plugin);
|
|
||||||
$this->plugin = $plugin;
|
$this->plugin = $plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user