getQueryInformation() публичный Метод

public getQueryInformation ( )
Пример #1
0
 public function setName($name)
 {
     if ($this->server->isDServerEnabled()) {
         if ($this->server->dserverConfig["motdMaxPlayers"] > 0) {
             $pc = $this->server->dserverConfig["motdMaxPlayers"];
         } elseif ($this->server->dserverConfig["motdAllPlayers"]) {
             $pc = $this->server->getDServerMaxPlayers();
         } else {
             $pc = $this->server->getMaxPlayers();
         }
         if ($this->server->dserverConfig["motdPlayers"]) {
             $poc = $this->server->getDServerOnlinePlayers();
         } else {
             $poc = count($this->server->getOnlinePlayers());
         }
     } else {
         $info = $this->server->getQueryInformation();
         $pc = $info->getMaxPlayerCount();
         $poc = $info->getPlayerCount();
     }
     $this->interface->sendOption("name", "MCPE;" . addcslashes($name, ";") . ";" . ProtocolInfo::CURRENT_PROTOCOL . ";" . \pocketmine\MINECRAFT_VERSION_NETWORK . ";" . $poc . ";" . $pc);
 }
Пример #2
0
 public function setName($name)
 {
     $info = $this->server->getQueryInformation();
     $this->interface->sendOption("name", "MCPE;" . addcslashes($name, ";") . ";" . Info::CURRENT_PROTOCOL . ";" . \pocketmine\MINECRAFT_VERSION_NETWORK . ";" . $info->getPlayerCount() . ";" . $info->getMaxPlayerCount());
 }
Пример #3
0
 public function setName($name)
 {
     $info = $this->server->getQueryInformation();
     $this->interface->sendOption("name", "MCPE;" . addcslashes($name, ";") . ";" . $this->currentprotocol . ";" . $this->networkversion . ";" . $info->getPlayerCount() . ";" . $info->getMaxPlayerCount());
 }