Package de.presti.ree6.language
Class Language
java.lang.Object
de.presti.ree6.language.Language
Class used to represent a Language.
-
Constructor Summary
ConstructorDescriptionLanguage
(@NotNull String locale, @NotNull String name, @NotNull String author, @NotNull String version, @NotNull HashMap<String, String> resources) Constructor used to create a Language.Language
(@NotNull org.simpleyaml.configuration.file.YamlConfiguration yamlConfiguration) Constructor used to create a Language. -
Method Summary
Modifier and TypeMethodDescriptionboolean
compareVersion
(Language language) Compare the current Language version with another Language.Called to get the Author of the Language-File.net.dv8tion.jda.api.interactions.DiscordLocale
Called to get the DiscordLocale of the Language.Called to get the Locale-Tag of the Language.getName()
Called to get the Name of the Language.getResource
(@NotNull String key, @Nullable Object... parameter) Called to get the entry of the Language.Called to get the corresponding Ree6 Version.
-
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
Called to get the Locale-Tag of the Language.- Returns:
- The Locale-Tag.
-
getName
Called to get the Name of the Language.- Returns:
- The Name.
-
getAuthor
Called to get the Author of the Language-File.- Returns:
- The Author.
-
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
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
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.
-