/** * @param int $currentTick */ public function onRun($currentTick) { $this->plugin->getServer()->getNetwork()->setName(str_replace(["{SERVER_DEFAULT_LEVEL}", "{SERVER_MAX_PLAYER_COUNT}", "{SERVER_PLAYER_COUNT}", "{SERVER_NAME}", "{SERVER_PORT}", "{SERVER_TPS}"], [$this->plugin->getServer()->getDefaultLevel()->getName(), $this->plugin->getServer()->getMaxPlayers(), count($this->plugin->getServer()->getOnlinePlayers()), $this->plugin->getServer()->getServerName(), $this->plugin->getServer()->getPort(), $this->plugin->getServer()->getTicksPerSecond()], $this->plugin->getConfig()->getNested("motd.dynamicMotd"))); }
/** * @param int $currentTick */ public function onRun($currentTick) { $this->plugin->getServer()->broadcastMessage(Utils::getRandom($this->plugin->getConfig()->getNested("message.messages"))); }