/** * @param int $currentTick */ public function onRun($currentTick) { if (!$this->plugin->isTimerPaused()) { if ($this->plugin->getTime() >= $this->plugin->getConfig()->get("startCountdown")) { $this->plugin->broadcastTime($this->plugin->getConfig()->get("broadcastMessage"), $this->plugin->getConfig()->get("displayType")); } } }
/** * @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); } } }