Class Language

java.lang.Object
de.presti.ree6.language.Language

public class Language extends Object
Class used to represent a Language.
  • Constructor Details

    • Language

      public Language(@NotNull @NotNull org.simpleyaml.configuration.file.YamlConfiguration yamlConfiguration)
      Constructor used to create a Language.
      Parameters:
      yamlConfiguration - The YamlConfiguration of the Language.
    • Language

      public Language(@NotNull @NotNull String locale, @NotNull @NotNull String name, @NotNull @NotNull String author, @NotNull @NotNull String version, @NotNull @NotNull HashMap<String,String> resources)
      Constructor used to create a Language.
      Parameters:
      locale - The Locale-Tag of the Language.
      name - The Name of the Language.
      author - The Author of the Language-File.
      version - The corresponding Ree6 Version.
      resources - All entries of the Language.
  • Method Details

    • getLocale

      public String getLocale()
      Called to get the Locale-Tag of the Language.
      Returns:
      The Locale-Tag.
    • getName

      public String getName()
      Called to get the Name of the Language.
      Returns:
      The Name.
    • getAuthor

      public String getAuthor()
      Called to get the Author of the Language-File.
      Returns:
      The Author.
    • getVersion

      public String getVersion()
      Called to get the corresponding Ree6 Version.
      Returns:
      The Version.
    • getDiscordLocale

      public net.dv8tion.jda.api.interactions.DiscordLocale getDiscordLocale()
      Called to get the DiscordLocale of the Language.
      Returns:
      The DiscordLocale.
    • getResource

      public String getResource(@NotNull @NotNull String key, @Nullable @Nullable Object... parameter)
      Called to get the entry of the Language.
      Parameters:
      key - The key of the entry.
      parameter - The parameter that should be used to replace placeholders.
      Returns:
      The entry.
    • compareVersion

      public boolean compareVersion(Language language)
      Compare the current Language version with another Language.
      Parameters:
      language - The Language to compare with.
      Returns:
      The result of the comparison. True, if it should update | False, if it should not be updated.