FML/ManiaCode/JoinServer.php
public function setIp($ip, $port = null)
    {
        $this->login = null;
        $this->ip    = (string)$ip;
        if ($port) {
            $this->setPort($port);
        }
        return $this;
    }
public function setIp($ip, $port = null)
    {
        $this->login = null;
        $this->ip    = (string)$ip;
        if ($port) {
            $this->setPort($port);
        }
        return $this;
    }
public function setIp ( $ ip , $ port = null ) { $ this -> login = null ; $ this -> ip = ( string ) $ ip ; if ( $ port ) { $ this -> setPort ( $ port ) ; } return $ this ; }
Set the server ip and port

@api
@param string $ip   Server ip
@param int    $port (optional) Server port
@return static
Set the server ip and port