Enum Class SupportedLanguage

java.lang.Object
java.lang.Enum<SupportedLanguage>
org.kingdoms.locale.SupportedLanguage
All Implemented Interfaces:
Serializable, Comparable<SupportedLanguage>, Constable, org.kingdoms.constants.DataStringRepresentation, org.kingdoms.locale.Language

public enum SupportedLanguage extends Enum<SupportedLanguage> implements org.kingdoms.locale.Language
https://minecraft.fandom.com/wiki/Language
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static SupportedLanguage[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SupportedLanguage valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • initialize

      public void initialize()
    • getYamlImporter

      public org.kingdoms.utils.config.importer.YamlGUIImporter getYamlImporter()
      Specified by:
      getYamlImporter in interface org.kingdoms.locale.Language
    • getLocale

      public Locale getLocale()
      Specified by:
      getLocale in interface org.kingdoms.locale.Language
    • getTimeZone

      @NotNull public @NotNull TimeZone getTimeZone()
      Specified by:
      getTimeZone in interface org.kingdoms.locale.Language
    • getInstalled

      public static List<SupportedLanguage> getInstalled()
    • getRegisteredGUINames

      public static Collection<String> getRegisteredGUINames()
    • getRepoPath

      public Path getRepoPath()
    • uninitialize

      public void uninitialize()
      Specified by:
      uninitialize in interface org.kingdoms.locale.Language
    • isInstalled

      public boolean isInstalled()
      Specified by:
      isInstalled in interface org.kingdoms.locale.Language
    • isLoaded

      public boolean isLoaded()
      Specified by:
      isLoaded in interface org.kingdoms.locale.Language
    • getMainLanguageFile

      public Path getMainLanguageFile()
    • getGUIFolder

      public Path getGUIFolder()
    • getGUIOrDefault

      public @Nullable GUIObject getGUIOrDefault(String name, boolean optional)
      Specified by:
      getGUIOrDefault in interface org.kingdoms.locale.Language
    • addMessage

      public void addMessage(org.kingdoms.locale.messenger.DefinedMessenger messenger, MessageProvider provider)
    • getMessages

      public Map<LanguageEntry,MessageProvider> getMessages()
      Specified by:
      getMessages in interface org.kingdoms.locale.Language
    • getGUI

      public GUIObject getGUI(String name)
      Specified by:
      getGUI in interface org.kingdoms.locale.Language
    • getGUIs

      public Map<String,GUIObject> getGUIs()
      Specified by:
      getGUIs in interface org.kingdoms.locale.Language
    • ensureInstalled

      public void ensureInstalled()
    • getInstalledCommitSHA

      public String getInstalledCommitSHA()
    • setInstalledCommitSHA

      public void setInstalledCommitSHA(String installedCommitSHA)
    • getLowerCaseName

      public String getLowerCaseName()
      Specified by:
      getLowerCaseName in interface org.kingdoms.locale.Language
    • asDataString

      @NotNull public @NotNull String asDataString()
      Specified by:
      asDataString in interface org.kingdoms.constants.DataStringRepresentation
    • getAdapter

      public YamlWithDefaults getAdapter()
    • getNativeName

      public String getNativeName()
      Specified by:
      getNativeName in interface org.kingdoms.locale.Language
    • fromName

      public static SupportedLanguage fromName(@Nullable String name)
    • getMessage

      @Contract("_, true -> !null") @Nullable public @Nullable MessageProvider getMessage(LanguageEntry lang, boolean error)
      Specified by:
      getMessage in interface org.kingdoms.locale.Language
    • getMessage

      public MessageObject getMessage(String... path)
      Specified by:
      getMessage in interface org.kingdoms.locale.Language
    • getVariableRaw

      public MessageObject getVariableRaw(String name)
      Specified by:
      getVariableRaw in interface org.kingdoms.locale.Language
    • getVariable

      public MessageObject getVariable(MessagePlaceholderProvider settings, String name, boolean raw)
      Specified by:
      getVariable in interface org.kingdoms.locale.Language