Configuration Class |
Namespace: spaar.ModLoader
public static class Configuration
The Configuration type exposes the following members.
Name | Description | |
---|---|---|
DoesKeyExist |
Checks whether a given key exists in the configuration for your mod.
Note that this will only be the case after it has ben set once.
| |
GetBool |
Gets a bool configuration value stored by your mod.
Returns defaultVal if the specified key does not exist for your mod or
the value stored at the specified key is not a bool.
| |
GetDouble |
Gets a double configuration value stored by your mod.
Returns defaultVal if the specified key does not exist for your mod or
the value stored at the specified key is not a double.
| |
GetFloat |
Gets a float configuration value stored by your mod.
Returns defaultVal if the specified key does not exist for your mod or
the value stored at the specified key is not a float.
| |
GetInt |
Gets an integer configuration value stored by your mod.
Returns defaultVal if the specified key does not exist for your mod or
the value stored at the specified key is not an integer.
| |
GetKeys |
Gets all keys currently stored in the configuration of your mod.
| |
GetString |
Gets a string configuration value stored by your mod.
Returns defaultVal if the specified key does not exist for your mod or
the value stored at the specified key is not a string.
| |
RemoveKey |
Removes the specified key and its associated value from the configuration.
| |
Save |
Saves the configuration of your mod to disk.
| |
SetBool |
Sets a bool in the configuration of your mod.
| |
SetDouble |
Sets a double in the configuration of your mod.
| |
SetFloat |
Sets a float in the configuration of your mod.
| |
SetInt |
Sets an integer in the configuration of your mod.
| |
SetString |
Sets a string in the configuration of your mod.
|
Name | Description | |
---|---|---|
OnConfigurationChange |
This event is raised whenever the configuration for your mod was changed.
Use this if your mod needs to react to changes that were made to its
configuration at runtime, possibly by the user via the console.
|