/** * @param int $currentTick */ public function onRun($currentTick) { if (!$this->plugin->isTimerPaused()) { if (Utils::isOverloaded($this->plugin->getMemoryLimit())) { $this->plugin->initiateRestart(RestartMe::OVERLOADED); } } }
/** * @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); } } }