Class TranslationRepository
java.lang.Object
me.lucko.luckperms.common.locale.TranslationRepository
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddownloadAndInstallTranslations(List<TranslationRepository.LanguageInfo> languages, @Nullable Sender sender, boolean updateStatus) Downloads and installs translations for the given languages.Gets a list of available languages.voidSchedules a refresh of the current translations if necessary.
-
Constructor Details
-
TranslationRepository
-
-
Method Details
-
getAvailableLanguages
public List<TranslationRepository.LanguageInfo> getAvailableLanguages() throws IOException, UnsuccessfulRequestExceptionGets a list of available languages.- Returns:
- a list of languages
- Throws:
IOException- if an i/o error occursUnsuccessfulRequestException- if the http request fails
-
scheduleRefresh
public void scheduleRefresh()Schedules a refresh of the current translations if necessary. -
downloadAndInstallTranslations
public void downloadAndInstallTranslations(List<TranslationRepository.LanguageInfo> languages, @Nullable Sender sender, boolean updateStatus) Downloads and installs translations for the given languages.- Parameters:
languages- the languages to install translations forsender- the sender to report progress toupdateStatus- if the status file should be updated
-