Class Config
java.lang.Object
me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config
- Direct Known Subclasses:
BlockInfoConfig
An old remnant of CS-CoreLib.
This will be removed once we updated everything.
Don't look at the code, it will be gone soon, don't worry.
Only used by the legacy
BlockStorage
system.-
Constructor Summary
ConstructorDescriptionCreates a new Config Object for the specified FileConfig
(File file, FileConfiguration config) Creates a new Config Object for the specified File and FileConfigurationCreates a new Config Object for the File with in the specified Location -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the Config contains the specified Pathvoid
Recreates the File of this ConfigConverts this Config Object into a plain FileConfiguration ObjectgetFile()
Returns the File the Config is handlinggetKeys()
Returns all Paths in this ConfigReturns all Sub-Paths in this ConfigReturns the String at the specified PathReturns the Object at the specified Pathvoid
reload()
Reloads the Configuration Filevoid
save()
Saves the Config Object to its Filevoid
Saves the Config Object to a Filevoid
setDefaultValue
(String path, Object value) Sets the Value for the specified Path (IF the Path does not yet exist)void
Sets the Value for the specified Path
-
Constructor Details
-
Config
Creates a new Config Object for the specified File- Parameters:
file
- The File for which the Config object is created for
-
Config
Creates a new Config Object for the specified File and FileConfiguration- Parameters:
file
- The File to save toconfig
- The FileConfiguration
-
Config
Creates a new Config Object for the File with in the specified Location- Parameters:
path
- The Path of the File which the Config object is created for
-
-
Method Details
-
getFile
Returns the File the Config is handling- Returns:
- The File this Config is handling
-
getConfiguration
Converts this Config Object into a plain FileConfiguration Object- Returns:
- The converted FileConfiguration Object
-
setValue
Sets the Value for the specified Path- Parameters:
path
- The path in the Config Filevalue
- The Value for that Path
-
save
public void save()Saves the Config Object to its File -
save
Saves the Config Object to a File- Parameters:
file
- The File you are saving this Config to
-
setDefaultValue
Sets the Value for the specified Path (IF the Path does not yet exist)- Parameters:
path
- The path in the Config Filevalue
- The Value for that Path
-
contains
Checks whether the Config contains the specified Path- Parameters:
path
- The path in the Config File- Returns:
- True/false
-
getValue
Returns the Object at the specified Path- Parameters:
path
- The path in the Config File- Returns:
- The Value at that Path
-
getString
Returns the String at the specified Path- Parameters:
path
- The path in the Config File- Returns:
- The String at that Path
-
createFile
public void createFile()Recreates the File of this Config -
getKeys
Returns all Paths in this Config- Returns:
- All Paths in this Config
-
getKeys
Returns all Sub-Paths in this Config- Parameters:
path
- The path in the Config File- Returns:
- All Sub-Paths of the specified Path
-
reload
public void reload()Reloads the Configuration File
-