Package de.themoep.utils.lang.bungee
Class BungeeLanguageConfig
java.lang.Object
de.themoep.utils.lang.LanguageConfig<net.md_5.bungee.config.Configuration>
de.themoep.utils.lang.bungee.BungeeLanguageConfig
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final net.md_5.bungee.config.ConfigurationProvider
Fields inherited from class de.themoep.utils.lang.LanguageConfig
config, configFile, defaultConfig, resourcePath, saveFile
-
Constructor Summary
ConstructorDescriptionBungeeLanguageConfig
(net.md_5.bungee.api.plugin.Plugin plugin, String resourceFolder, File configFile, String locale) BungeeLanguageConfig
(net.md_5.bungee.api.plugin.Plugin plugin, String resourceFolder, File configFile, String locale, boolean saveFile) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if the config contains a certain keyboolean
Check if the config contains a certain keyGet a string from the config by its keynet.md_5.bungee.config.Configuration
Get the raw config objectvoid
Load the config from the file systemboolean
Save the default config resource from the jar file to the file systemMethods inherited from class de.themoep.utils.lang.LanguageConfig
get, get, getLocale, setDefaults
-
Field Details
-
yml
protected static final net.md_5.bungee.config.ConfigurationProvider yml
-
-
Constructor Details
-
BungeeLanguageConfig
-
BungeeLanguageConfig
-
-
Method Details
-
loadConfig
public void loadConfig()Description copied from class:LanguageConfig
Load the config from the file system- Specified by:
loadConfig
in classLanguageConfig<net.md_5.bungee.config.Configuration>
-
saveConfigResource
public boolean saveConfigResource()Description copied from class:LanguageConfig
Save the default config resource from the jar file to the file system- Specified by:
saveConfigResource
in classLanguageConfig<net.md_5.bungee.config.Configuration>
- Returns:
- Whether or not the file was saved. If it already existed this will return false
-
contains
Description copied from class:LanguageConfig
Check if the config contains a certain key- Specified by:
contains
in classLanguageConfig<net.md_5.bungee.config.Configuration>
- Parameters:
key
- The key of the string- Returns:
true
if this config (and not the defaults) has this key,false
if not
-
contains
Description copied from class:LanguageConfig
Check if the config contains a certain key- Specified by:
contains
in classLanguageConfig<net.md_5.bungee.config.Configuration>
- Parameters:
key
- The key of the stringcheckDefault
- Whether or not to check the default config- Returns:
true
if this config (and the default) has this key,false
if not
-
get
Description copied from class:LanguageConfig
Get a string from the config by its key- Specified by:
get
in classLanguageConfig<net.md_5.bungee.config.Configuration>
- Parameters:
key
- The key of the string- Returns:
- The message or an error message if it doesn't exist; never null! (use
LanguageConfig.contains(String)
to check existance)
-
getRawConfig
public net.md_5.bungee.config.Configuration getRawConfig()Description copied from class:LanguageConfig
Get the raw config object- Specified by:
getRawConfig
in classLanguageConfig<net.md_5.bungee.config.Configuration>
- Returns:
- The raw config object
-