pocketmine\Server::start PHP Method

start() public method

Starts the PocketMine-MP server and starts processing ticks and packets
public start ( )
    public function start()
    {
        if ($this->getConfigBoolean("enable-query", true) === true) {
            $this->queryHandler = new QueryHandler();
        }
        foreach ($this->getIPBans()->getEntries() as $entry) {
            $this->network->blockAddress($entry->getName(), -1);
        }
        if ($this->getProperty("settings.send-usage", true)) {
            $this->sendUsageTicker = 6000;
            $this->sendUsage(SendUsageTask::TYPE_OPEN);
        }
        if ($this->getProperty("network.upnp-forwarding", false) == true) {
            $this->logger->info("[UPnP] Trying to port forward...");
            UPnP::PortForward($this->getPort());
        }
        $this->tickCounter = 0;
        if (function_exists("pcntl_signal")) {
            pcntl_signal(SIGTERM, [$this, "handleSignal"]);
            pcntl_signal(SIGINT, [$this, "handleSignal"]);
            pcntl_signal(SIGHUP, [$this, "handleSignal"]);
            $this->dispatchSignals = true;
        }
        $this->logger->info($this->getLanguage()->translateString("pocketmine.server.defaultGameMode", [self::getGamemodeString($this->getGamemode())]));
        $this->logger->info($this->getLanguage()->translateString("pocketmine.server.startFinished", [round(microtime(true) - \pocketmine\START_TIME, 3)]));
        $this->tickProcessor();
        $this->forceShutdown();
        gc_collect_cycles();
    }
Server