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.ItemStack
getItem()
getName
(org.bukkit.entity.Player p) double
This method returns the progress of translation for thisLanguage
.boolean
void
setFile
(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 englishLanguage
file 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
ItemStack
used to display thisLanguage
-
getName
- Parameters:
p
- ThePlayer
to localize the name for- Returns:
- The localized name of this
Language
-
isDefault
public boolean isDefault()- Returns:
- Whether this is the default
Language
of thisServer
-
toString
-