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
ColorError
Colour for notifications that report something broken.
public string ColorError { get; set; }
Property Value
ColorInfo
Colour for notifications that are neither good nor bad.
public string ColorInfo { get; set; }
Property Value
ColorSuccess
Colour for notifications that report something going right.
public string ColorSuccess { get; set; }
Property Value
ColorWarning
Colour for notifications worth knowing about.
public string ColorWarning { get; set; }
Property Value
Enabled
Master switch for this scope. When false, nothing is shown.
public bool Enabled { get; set; }
Property Value
IdleShutdown
public bool IdleShutdown { get; set; }
Property Value
PlayerDeath
public bool PlayerDeath { get; set; }
Property Value
PlayerJoined
public bool PlayerJoined { get; set; }
Property Value
PlayerLeft
public bool PlayerLeft { get; set; }
Property Value
ServerCrashed
public bool ServerCrashed { get; set; }
Property Value
WokeOnDemand
public bool WokeOnDemand { get; set; }
Property Value
Methods
Allows(NotificationKind)
True if this scope allows kind (master on AND that kind on).
public bool Allows(NotificationKind kind)
Parameters
kindNotificationKind
Returns
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
ColorFor(NotificationLevel)
The configured colour for a level, as a hex string.
public string ColorFor(NotificationLevel level)
Parameters
levelNotificationLevel
Returns
SetColorFor(NotificationLevel, string)
Sets the colour for a level. Used by the settings dialog.
public void SetColorFor(NotificationLevel level, string hex)
Parameters
levelNotificationLevelhexstring