public static Integer getNextPort(String listenHostname, String hostname) {
		
		String[] split = pare(listenHostname, hostname);
		
		if(split == null) {
			return null;
		}
		
		String[] split2 = split[0].split(":");
		
		String portnum;
		
		if(split2.length<=1) {
			try {
				return Integer.parseInt(split2[0]);
			} catch (NumberFormatException nfe) {
				return 25565;
			}
		} else if(split2.length == 2) {
			portnum = split2[1];
		} else {
			return null;
		}
		
		try {
			return Integer.parseInt(portnum);
		} catch (NumberFormatException nfe) {
			return null;
		}
	
	}