Server::getIp() now returns 0.0.0.0 if the IP string is empty

This commit is contained in:
Dylan K. Taylor
2018-05-10 10:25:44 +01:00
parent e7c5d14af3
commit 5e91c05424
3 changed files with 6 additions and 5 deletions

View File

@ -83,7 +83,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->rakLib = new RakLibServer(
$this->server->getLogger(),
\pocketmine\COMPOSER_AUTOLOADER_PATH,
new InternetAddress($this->server->getIp() === "" ? "0.0.0.0" : $this->server->getIp(), $this->server->getPort(), 4),
new InternetAddress($this->server->getIp(), $this->server->getPort(), 4),
(int) $this->server->getProperty("network.max-mtu-size", 1492),
self::MCPE_RAKNET_PROTOCOL_VERSION,
$this->sleeper