Table of Contents

Interface ISettingsService

Namespace
Artemis.Core.Services
Assembly
Artemis.Core.dll

A wrapper around plugin settings for miscellaneous use outside plugins

Do not inject into a plugin, for plugins inject PluginSettings instead.

public interface ISettingsService : IProtectedArtemisService

Methods

GetSetting<T>(string, T?)

Gets the setting with the provided name. If the setting does not exist yet, it is created.

PluginSetting<T> GetSetting<T>(string name, T? defaultValue = default)

Parameters

name string

The name of the setting, may not be longer than 128 characters

defaultValue T

The default value to use if the setting does not exist yet

Returns

PluginSetting<T>

Type Parameters

T

The type of the setting, can be any serializable type

SaveAllSettings()

Saves all settings, obviously

void SaveAllSettings()