Artemis Artemis
Artemis Artemis

Search Results for

    Class PluginSettings

    This contains all the settings for your plugin. To access a setting use GetSetting<T>(string, T?).

    To use this class, inject it into the constructor of your plugin.

    Inheritance
    object
    PluginSettings
    Namespace: Artemis.Core
    Assembly: Artemis.Core.dll
    Syntax
    public class PluginSettings

    Properties

    Plugin

    Gets the plugin these settings belong to

    Declaration
    public Plugin Plugin { get; }
    Property Value
    Type Description
    Plugin

    Methods

    GetSetting<T>(string, T?)

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

    Declaration
    public PluginSetting<T> GetSetting<T>(string name, T? defaultValue = default)
    Parameters
    Type Name Description
    string name

    The name of the setting

    T defaultValue

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

    Returns
    Type Description
    PluginSetting<T>
    Type Parameters
    Name Description
    T

    The type of the setting, can be any serializable type

    SaveAllSettings()

    Saves all currently loaded settings

    Declaration
    public void SaveAllSettings()
    Content is available under the PolyForm Noncommercial License, by Artemis RGB.