java.lang.Object
plugily.projects.buildbattle.utils.services.locale.LocaleService

public class LocaleService
extends Object
Localization service used for fetching latest locales for minigames
  • Constructor Details

    • LocaleService

      public LocaleService​(org.bukkit.plugin.java.JavaPlugin plugin)
  • Method Details

    • demandLocaleDownload

      public LocaleService.DownloadStatus demandLocaleDownload​(Locale locale)
      Sends a demand request to download latest locale from Plajer-Lair/locale_storage repository Whole repository can be seen here https://github.com/Plajer-Lair/locale_storage
      Parameters:
      locale - locale to download
      Returns:
      SUCCESS for downloaded locale, FAIL for service fault, LATEST when locale is latest as one in repository
    • isValidVersion

      public boolean isValidVersion()
      Checks if plugin version allows to update locale
      Returns:
      true if locale can be updated for this version else cannot