Table of Contents

Class PluginSettings

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

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.

public class PluginSettings
Inheritance
PluginSettings

Properties

Plugin

Gets the plugin these settings belong to

public Plugin Plugin { get; }

Property Value

Plugin

Methods

GetSetting<T>(string, T?)

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

public 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 currently loaded settings

public void SaveAllSettings()