Class SpigotConfigAdapter
java.lang.Object
cz.foresttech.forestredis.spigot.adapter.SpigotConfigAdapter
- All Implemented Interfaces:
- IConfigurationAdapter
Implementation of 
IConfigurationAdapter for Spigot version- 
Constructor SummaryConstructorsConstructorDescriptionSpigotConfigAdapter(org.bukkit.plugin.java.JavaPlugin plugin) Constructs the instance of adapter.
- 
Method SummaryModifier 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- 
SpigotConfigAdapterpublic SpigotConfigAdapter(org.bukkit.plugin.java.JavaPlugin plugin) Constructs the instance of adapter.- Parameters:
- plugin-- JavaPlugininstance
 
 
- 
- 
Method Details- 
setupDescription copied from interface:IConfigurationAdapterSetups the configuration file by provided name.- Specified by:
- setupin interface- IConfigurationAdapter
- Parameters:
- fileName- Name of the file to setup
 
- 
isSetuppublic boolean isSetup()Description copied from interface:IConfigurationAdapterChecks if the configuration is setup- Specified by:
- isSetupin interface- IConfigurationAdapter
- Returns:
- If the configuration is setup
 
- 
loadConfigurationpublic void loadConfiguration()Description copied from interface:IConfigurationAdapterLoads the configuration- Specified by:
- loadConfigurationin interface- IConfigurationAdapter
 
- 
getStringDescription copied from interface:IConfigurationAdapterReturns the String value from the configuration.- Specified by:
- getStringin interface- IConfigurationAdapter
- 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.
 
- 
getIntDescription copied from interface:IConfigurationAdapterReturns the int value from the configuration.- Specified by:
- getIntin interface- IConfigurationAdapter
- 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.
 
- 
getBooleanDescription copied from interface:IConfigurationAdapterReturns the boolean value from the configuration.- Specified by:
- getBooleanin interface- IConfigurationAdapter
- 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.
 
- 
getStringListDescription copied from interface:IConfigurationAdapterReturns the list of Strings from the configuration.- Specified by:
- getStringListin interface- IConfigurationAdapter
- Parameters:
- path- Path in the configuration.
- Returns:
- list of strings from the configuration. Returns empty list if path is not available.
 
 
-