Class BungeeConfigAdapter
java.lang.Object
cz.foresttech.forestredis.bungee.adapter.BungeeConfigAdapter
- All Implemented Interfaces:
IConfigurationAdapter
Implementation of
IConfigurationAdapter for Bungee version-
Constructor Summary
ConstructorsConstructorDescriptionBungeeConfigAdapter(net.md_5.bungee.api.plugin.Plugin plugin) Constructs the instance of adapter. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(String path, boolean def) Returns the boolean value from the configuration.intReturns the int value from the configuration.Returns the String value from the configuration.getStringList(String path) Returns the list of Strings from the configuration.booleanisSetup()Checks if the configuration is setupvoidLoads the configurationvoidSetups the configuration file by provided name.
-
Constructor Details
-
BungeeConfigAdapter
public BungeeConfigAdapter(net.md_5.bungee.api.plugin.Plugin plugin) Constructs the instance of adapter.- Parameters:
plugin-Plugininstance
-
-
Method Details
-
setup
Description copied from interface:IConfigurationAdapterSetups the configuration file by provided name.- Specified by:
setupin interfaceIConfigurationAdapter- Parameters:
fileName- Name of the file to setup
-
isSetup
public boolean isSetup()Description copied from interface:IConfigurationAdapterChecks if the configuration is setup- Specified by:
isSetupin interfaceIConfigurationAdapter- Returns:
- If the configuration is setup
-
loadConfiguration
public void loadConfiguration()Description copied from interface:IConfigurationAdapterLoads the configuration- Specified by:
loadConfigurationin interfaceIConfigurationAdapter
-
getString
Description copied from interface:IConfigurationAdapterReturns the String value from the configuration.- Specified by:
getStringin interfaceIConfigurationAdapter- Parameters:
path- Path in the configuration.def- Default value if the path is not set.- Returns:
- String value from the configuration. Returns "def" if path is not available.
-
getInt
Description copied from interface:IConfigurationAdapterReturns the int value from the configuration.- Specified by:
getIntin interfaceIConfigurationAdapter- Parameters:
path- Path in the configuration.def- Default value if the path is not set.- Returns:
- int value from the configuration. Returns "def" if path is not available.
-
getBoolean
Description copied from interface:IConfigurationAdapterReturns the boolean value from the configuration.- Specified by:
getBooleanin interfaceIConfigurationAdapter- Parameters:
path- Path in the configuration.def- Default value if the path is not set.- Returns:
- boolean value from the configuration. Returns "def" if path is not available.
-
getStringList
Description copied from interface:IConfigurationAdapterReturns the list of Strings from the configuration.- Specified by:
getStringListin interfaceIConfigurationAdapter- Parameters:
path- Path in the configuration.- Returns:
- list of strings from the configuration. Returns empty list if path is not available.
-