Class Language
java.lang.Object
io.github.thebusybiscuit.slimefun4.core.services.localization.Language
This Class represents a
Language that Slimefun can recognize and use.- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()This returns the identifier of thisLanguage.org.bukkit.inventory.ItemStackgetItem()getName(org.bukkit.entity.Player p) doubleThis method returns the progress of translation for thisLanguage.booleanvoidsetFile(LanguageFile file, org.bukkit.configuration.file.FileConfiguration config) toString()
-
Constructor Details
-
Method Details
-
getId
This returns the identifier of thisLanguage.- Returns:
- The identifier of this
Language
-
getTranslationProgress
public double getTranslationProgress()This method returns the progress of translation for thisLanguage. The progress is determined by the amount of translated strings divided by the amount of strings in the englishLanguagefile and multiplied by 100.0- Returns:
- A percentage
(0.0 - 100.0)for the progress of translation of thisLanguage
-
setFile
public void setFile(@Nonnull LanguageFile file, @Nonnull org.bukkit.configuration.file.FileConfiguration config) -
getItem
@Nonnull public org.bukkit.inventory.ItemStack getItem()- Returns:
- The
ItemStackused to display thisLanguage
-
getName
- Parameters:
p- ThePlayerto localize the name for- Returns:
- The localized name of this
Language
-
isDefault
public boolean isDefault()- Returns:
- Whether this is the default
Languageof thisServer
-
toString
-