mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Move Internet-related functions from Utils into their own class (#2324)
- Added `Internet::getIP()`, `Internet::getURL()`, `Internet::postURL()`, and `Internet::simpleCurl()`. - Deprecated the corresponding functions in `Utils`. Updating to the new functions is as simple as replacing `Utils` with `Internet`, since this doesn't break backwards compatibility. The deprecations should be catered for by plugin developers. These deprecated redirects will be removed no later than 4.0.0.
This commit is contained in:
@ -29,7 +29,7 @@ namespace pocketmine\wizard;
|
||||
|
||||
use pocketmine\lang\BaseLang;
|
||||
use pocketmine\utils\Config;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\utils\Internet;
|
||||
|
||||
class SetupWizard{
|
||||
public const DEFAULT_NAME = \pocketmine\NAME . " Server";
|
||||
@ -205,7 +205,7 @@ LICENSE;
|
||||
|
||||
$this->message($this->lang->get("ip_get"));
|
||||
|
||||
$externalIP = Utils::getIP();
|
||||
$externalIP = Internet::getIP();
|
||||
if($externalIP === false){
|
||||
$externalIP = "unknown (server offline)";
|
||||
}
|
||||
|
Reference in New Issue
Block a user