Interface ResourceLoader
- All Known Implementing Classes:
LanguageResourceLoader
public interface ResourceLoader
An interface that represents classes responsible for loading an installed resource file from
the plugin data directory.
-
Method Summary
Modifier and TypeMethodDescriptionGets language tag specified in config.yml.org.bukkit.configuration.Configuration
load()
Load the language configuration object for the configured language from file and return it.
-
Method Details
-
getConfiguredLanguageTag
Optional<LanguageTag> getConfiguredLanguageTag()Gets language tag specified in config.yml.it is recommended, but not required, that languages should be specified by their ISO-639 codes, with two letter lowercase language code and two letter uppercase country code separated by a hyphen.
example: en-US
The language yaml file must match the specified tag, with a .yml extension appended.
- Returns:
- Optional
LanguageTag
or an empty Optional if config setting is null or empty
-
getConfiguredLocale
Locale getConfiguredLocale() -
load
org.bukkit.configuration.Configuration load()Load the language configuration object for the configured language from file and return it. The returned configuration object contains no default values loaded, by design- Returns:
Configuration
containing the configuration loaded from the language file
-