コード例 #1
0
 /**
  * @param int $currentTick
  */
 public function onRun($currentTick)
 {
     if (!$this->plugin->isTimerPaused()) {
         if (Utils::isOverloaded($this->plugin->getMemoryLimit())) {
             $this->plugin->initiateRestart(RestartMe::OVERLOADED);
         }
     }
 }
コード例 #2
0
 /**
  * @param int $currentTick
  */
 public function onRun($currentTick)
 {
     if (!$this->plugin->isTimerPaused()) {
         $this->plugin->subtractTime(1);
         if ($this->plugin->getTime() <= $this->plugin->getConfig()->get("startCountdown")) {
             $this->plugin->broadcastTime($this->plugin->getConfig()->get("countdownMessage"), $this->plugin->getConfig()->get("displayType"));
         }
         if ($this->plugin->getTime() < 1) {
             $this->plugin->initiateRestart(RestartMe::NORMAL);
         }
     }
 }