private MetadataResponse getTranslationsMetadata() throws IOException, UnsuccessfulRequestException {
        Request request = new Request.Builder()
                .header("User-Agent", this.plugin.getBytebin().getUserAgent())
                .url(TRANSLATIONS_INFO_ENDPOINT)
                .build();

        JsonObject jsonResponse;
        try (Response response = this.plugin.getBytebin().makeHttpRequest(request)) {
            try (ResponseBody responseBody = response.body()) {
                if (responseBody == null) {
                    throw new RuntimeException("No response");
                }

                try (InputStream inputStream = new LimitedInputStream(responseBody.byteStream(), MAX_BUNDLE_SIZE)) {
                    try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
                        jsonResponse = GsonProvider.normal().fromJson(reader, JsonObject.class);
                    }
                }
            }
        }

        List<LanguageInfo> languages = new ArrayList<>();
        for (Map.Entry<String, JsonElement> language : jsonResponse.get("languages").getAsJsonObject().entrySet()) {
            languages.add(new LanguageInfo(language.getKey(), language.getValue().getAsJsonObject()));
        }
        languages.removeIf(language -> language.progress() <= 0);

        if (languages.size() >= 100) {
            // just a precaution: if more than 100 languages have been
            // returned then the metadata server is doing something silly
            throw new IOException("More than 100 languages - cancelling download");
        }

        long cacheMaxAge = jsonResponse.get("cacheMaxAge").getAsLong();

        return new MetadataResponse(cacheMaxAge, languages);
    }
Downloads and installs translations for the given languages.

@param languages the languages to install translations for
@param sender the sender to report progress to
@param updateStatus if the status file should be updated
common/src/main/java/me/lucko/luckperms/common/locale/TranslationRepository.java