private static ServerJoinInfo getDetailsFromDirectUrl(final String url) {
        if (url == null) {
            throw new NullPointerException("url");
        }
        ServerJoinInfo result = new ServerJoinInfo();
        final Matcher directUrlMatch = directUrlRegex.matcher(url);
        if (directUrlMatch.matches()) {
            try {
                result.address = InetAddress.getByName(directUrlMatch.group(1));
            } catch (final UnknownHostException ex) {
                return null;
            }
            final String portNum = directUrlMatch.group(6);
            if (portNum != null && portNum.length() > 0) {
                try {
                    result.port = Integer.parseInt(portNum);
                } catch (final NumberFormatException ex) {
                    return null;
                }
            } else {
                result.port = 25565;
            }
            result.playerName = directUrlMatch.group(7);
            final String mppass = directUrlMatch.group(9);
            if (mppass != null && mppass.length() > 0) {
                result.pass = mppass;
            } else {
                result.pass = BLANK_MPPASS;
            }
            return result;
        }
        return null;
    }