Table of Contents

Class NotificationSettings

Namespace
McServerLauncher.Models
Assembly
McServerLauncher.dll

Which notifications are enabled, for a given scope. Used both globally (default for every server, in AppSettings) and per-server (an override, in ServerConfig). Enabled is the master switch for the scope; the per-kind flags are only consulted when it's on.

public class NotificationSettings
Inheritance
NotificationSettings
Inherited Members

Properties

AutoRestartGaveUp

public bool AutoRestartGaveUp { get; set; }

Property Value

bool

ColorError

Colour for notifications that report something broken.

public string ColorError { get; set; }

Property Value

string

ColorInfo

Colour for notifications that are neither good nor bad.

public string ColorInfo { get; set; }

Property Value

string

ColorSuccess

Colour for notifications that report something going right.

public string ColorSuccess { get; set; }

Property Value

string

ColorWarning

Colour for notifications worth knowing about.

public string ColorWarning { get; set; }

Property Value

string

Enabled

Master switch for this scope. When false, nothing is shown.

public bool Enabled { get; set; }

Property Value

bool

IdleShutdown

public bool IdleShutdown { get; set; }

Property Value

bool

PlayerDeath

public bool PlayerDeath { get; set; }

Property Value

bool

PlayerJoined

public bool PlayerJoined { get; set; }

Property Value

bool

PlayerLeft

public bool PlayerLeft { get; set; }

Property Value

bool

ServerCrashed

public bool ServerCrashed { get; set; }

Property Value

bool

WokeOnDemand

public bool WokeOnDemand { get; set; }

Property Value

bool

Methods

Allows(NotificationKind)

True if this scope allows kind (master on AND that kind on).

public bool Allows(NotificationKind kind)

Parameters

kind NotificationKind

Returns

bool

Clone()

A copy (used to seed a per-server override from the global defaults). Copied field-by-field on purpose: if a reference-typed field is ever added here, a MemberwiseClone would silently share it between the global and per-server copies — this makes each field an explicit choice.

public NotificationSettings Clone()

Returns

NotificationSettings

ColorFor(NotificationLevel)

The configured colour for a level, as a hex string.

public string ColorFor(NotificationLevel level)

Parameters

level NotificationLevel

Returns

string

SetColorFor(NotificationLevel, string)

Sets the colour for a level. Used by the settings dialog.

public void SetColorFor(NotificationLevel level, string hex)

Parameters

level NotificationLevel
hex string