Class ConfigManager
Used to handle plugin configs.
Inheritance
Inherited Members
Namespace: Exiled.Loader
Assembly: Exiled.Loader.dll
Syntax
public static class ConfigManager
Methods
| Improve this Doc View SourceClear()
Clears the configs.
Declaration
public static bool Clear()
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating whether configs have been cleared successfully or not. |
LoadConfig(IPlugin<IConfig>, Dictionary<String, Object>)
Loads the config of a plugin using the distribution.
Declaration
public static IConfig LoadConfig(this IPlugin<IConfig> plugin, Dictionary<string, object> rawConfigs = null)
Parameters
Type | Name | Description |
---|---|---|
IPlugin<IConfig> | plugin | The plugin which config will be loaded. |
System.Collections.Generic.Dictionary<System.String, System.Object> | rawConfigs | The raw configs to detect if the plugin already has generated configs. |
Returns
Type | Description |
---|---|
IConfig | The IConfig of the plugin. |
LoadDefaultConfig(IPlugin<IConfig>, Dictionary<String, Object>)
Loads the config of a plugin using the default distribution.
Declaration
public static IConfig LoadDefaultConfig(this IPlugin<IConfig> plugin, Dictionary<string, object> rawConfigs)
Parameters
Type | Name | Description |
---|---|---|
IPlugin<IConfig> | plugin | The plugin which config will be loaded. |
System.Collections.Generic.Dictionary<System.String, System.Object> | rawConfigs | The raw configs to detect if the plugin already has generated configs. |
Returns
Type | Description |
---|---|
IConfig | The IConfig of the plugin. |
LoadSeparatedConfig(IPlugin<IConfig>)
Loads the config of a plugin using the separated distribution.
Declaration
public static IConfig LoadSeparatedConfig(this IPlugin<IConfig> plugin)
Parameters
Type | Name | Description |
---|---|---|
IPlugin<IConfig> | plugin | The plugin which its config will be loaded. |
Returns
Type | Description |
---|---|
IConfig | The IConfig of the plugin. |
LoadSorted(String)
Loads all the plugin configs.
Declaration
public static SortedDictionary<string, IConfig> LoadSorted(string rawConfigs)
Parameters
Type | Name | Description |
---|---|---|
System.String | rawConfigs | The raw configs to be loaded. |
Returns
Type | Description |
---|---|
System.Collections.Generic.SortedDictionary<System.String, IConfig> | Returns a dictionary of loaded configs. |
Read()
Read all plugin configs.
Declaration
public static string Read()
Returns
Type | Description |
---|---|
System.String | Returns the read configs. |
Reload()
Reads, loads, and saves plugin configs.
Declaration
public static bool Reload()
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating if the reloading process has been completed successfully or not. |
ReloadRemoteAdmin()
Reloads RemoteAdmin configs.
Declaration
public static void ReloadRemoteAdmin()
Save(SortedDictionary<String, IConfig>)
Saves plugin configs.
Declaration
public static bool Save(SortedDictionary<string, IConfig> configs)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.SortedDictionary<System.String, IConfig> | configs | The configs to be saved. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating whether the configs have been saved successfully or not. |
SaveDefaultConfig(String)
Saves default distribution configs.
Declaration
public static bool SaveDefaultConfig(string configs)
Parameters
Type | Name | Description |
---|---|---|
System.String | configs | The configs to be saved, already serialized in yaml format. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating whether the configs have been saved successfully or not. |
SaveSeparatedConfig(String, String)
Saves separated distribution plugin configs.
Declaration
public static bool SaveSeparatedConfig(this string pluginPrefix, string configs)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginPrefix | The prefix of the plugin which its config is going to be saved. |
System.String | configs | The configs to be saved, already serialized in yaml format. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating whether the configs have been saved successfully or not. |