mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
@ -29,9 +29,7 @@ namespace pocketmine\network\upnp;
|
||||
use pocketmine\utils\Internet;
|
||||
use pocketmine\utils\Utils;
|
||||
use function class_exists;
|
||||
use function gethostbyname;
|
||||
use function is_object;
|
||||
use function trim;
|
||||
|
||||
abstract class UPnP{
|
||||
|
||||
@ -46,7 +44,7 @@ abstract class UPnP{
|
||||
throw new \RuntimeException("UPnP requires the com_dotnet extension");
|
||||
}
|
||||
|
||||
$myLocalIP = gethostbyname(trim(`hostname`));
|
||||
$myLocalIP = Internet::getInternalIP();
|
||||
|
||||
/** @noinspection PhpUndefinedClassInspection */
|
||||
$com = new \COM("HNetCfg.NATUPnP");
|
||||
|
Reference in New Issue
Block a user