Table of Contents

Class ConfigManager

Namespace
Exiled.Loader
Assembly
Exiled.Loader.dll

Used to handle plugin configs.

public static class ConfigManager
Inheritance
ConfigManager
Inherited Members

Methods

Clear()

Clears the configs.

public static bool Clear()

Returns

bool

Returns a value indicating whether configs have been cleared successfully.

LoadConfig(IPlugin<IConfig>, Dictionary<string, object>)

Loads the config of a plugin using the distribution.

public static IConfig LoadConfig(this IPlugin<IConfig> plugin, Dictionary<string, object> rawConfigs = null)

Parameters

plugin IPlugin<IConfig>

The plugin which config will be loaded.

rawConfigs Dictionary<string, object>

The raw configs to detect if the plugin already has generated configs.

Returns

IConfig

The IConfig of the plugin.

LoadDefaultConfig(IPlugin<IConfig>, Dictionary<string, object>)

Loads the config of a plugin using the default distribution.

public static IConfig LoadDefaultConfig(this IPlugin<IConfig> plugin, Dictionary<string, object> rawConfigs)

Parameters

plugin IPlugin<IConfig>

The plugin which config will be loaded.

rawConfigs Dictionary<string, object>

The raw configs to detect if the plugin already has generated configs.

Returns

IConfig

The IConfig of the plugin.

LoadSeparatedConfig(IPlugin<IConfig>)

Loads the config of a plugin using the separated distribution.

public static IConfig LoadSeparatedConfig(this IPlugin<IConfig> plugin)

Parameters

plugin IPlugin<IConfig>

The plugin which its config will be loaded.

Returns

IConfig

The IConfig of the plugin.

LoadSorted(string)

Loads all the plugin configs.

public static SortedDictionary<string, IConfig> LoadSorted(string rawConfigs)

Parameters

rawConfigs string

The raw configs to be loaded.

Returns

SortedDictionary<string, IConfig>

Returns a dictionary of loaded configs.

Read()

Read all plugin configs.

public static string Read()

Returns

string

Returns the read configs.

Reload()

Reads, loads, and saves plugin configs.

public static bool Reload()

Returns

bool

Returns a value indicating if the reloading process has been completed successfully or not.

ReloadRemoteAdmin()

Reloads RemoteAdmin configs.

public static void ReloadRemoteAdmin()

Save(SortedDictionary<string, IConfig>)

Saves plugin configs.

public static bool Save(SortedDictionary<string, IConfig> configs)

Parameters

configs SortedDictionary<string, IConfig>

The configs to be saved.

Returns

bool

Returns a value indicating whether the configs have been saved successfully.

SaveDefaultConfig(string)

Saves default distribution configs.

public static bool SaveDefaultConfig(string configs)

Parameters

configs string

The configs to be saved, already serialized in yaml format.

Returns

bool

Returns a value indicating whether the configs have been saved successfully.

SaveSeparatedConfig(string, string)

Saves separated distribution plugin configs.

public static bool SaveSeparatedConfig(this string pluginPrefix, string configs)

Parameters

pluginPrefix string

The prefix of the plugin which its config is going to be saved.

configs string

The configs to be saved, already serialized in yaml format.

Returns

bool

Returns a value indicating whether the configs have been saved successfully.