Class JSONConfig
java.lang.Object
net.vitacraft.serverlibraries.api.config.JSONConfig
- All Implemented Interfaces:
Config
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet a boolean value from the configurationdoubleGet a double value from the configurationintGet an integer value from the configurationlongGet a long value from the configurationgetName()Get the name of the configuration fileGet a string value from the configurationgetStringList(String key) Get a list of strings from the configurationvoidSet a boolean value in the configurationvoidSet a double value in the configurationvoidSet an integer value in the configurationvoidvoidSet a string value in the configuration
-
Constructor Details
-
JSONConfig
Create a new JSONConfig instance- Parameters:
file- the file to load the configuration from
-
-
Method Details
-
getName
Get the name of the configuration file -
getString
Get a string value from the configuration -
getInt
Get an integer value from the configuration -
getBool
Get a boolean value from the configuration -
getDouble
Get a double value from the configuration -
getLong
Get a long value from the configuration -
getStringList
Get a list of strings from the configuration- Specified by:
getStringListin interfaceConfig- Parameters:
key- the key to get the value from- Returns:
- the list of strings
-
setString
Set a string value in the configuration -
setInt
Set an integer value in the configuration -
setBool
Set a boolean value in the configuration -
setDouble
Set a double value in the configuration -
setLong
-