Table of Contents

Class AppSettings

Namespace
McServerLauncher.Models
Assembly
McServerLauncher.dll

Global application settings (not per-server).

public class AppSettings
Inheritance
AppSettings
Inherited Members

Properties

CloseToTray

Closing the window with the X sends it to the tray instead of quitting the app. Off by default: the X quits, which is what most people expect.

public bool CloseToTray { get; set; }

Property Value

bool

ConsoleChatColor

Colour for player chat in the console.

public string ConsoleChatColor { get; set; }

Property Value

string

ConsolePlayersColor

Colour for joins, leaves and deaths in the console.

public string ConsolePlayersColor { get; set; }

Property Value

string

DedicatedServerMachine

The machine is only for servers, so together they may use all its memory but 2 GB. Off by default: then they share at most half, leaving the rest for a game played on the same PC.

public bool DedicatedServerMachine { get; set; }

Property Value

bool

Language

UI language (es, en, pt, fr, de). Empty = system language.

public string? Language { get; set; }

Property Value

string

LastVersionSeen

Last app version the user has already seen (to show the what's-new screen after updating).

public string? LastVersionSeen { get; set; }

Property Value

string

MemoryAgentEnabled

Lets the app hold an Automatic server's heap tighter while the PC is short of memory, through a small agent in the server's JVM. On by default; off keeps every server exactly as it starts.

public bool MemoryAgentEnabled { get; set; }

Property Value

bool

MinimizeToTray

Minimizing sends the window to the tray (it leaves the taskbar) instead of minimizing normally.

public bool MinimizeToTray { get; set; }

Property Value

bool

Notifications

Global desktop-notification preferences: the master switch and which kinds are enabled. These apply to every server unless the server has its own override (see UseCustomNotifications).

public NotificationSettings Notifications { get; set; }

Property Value

NotificationSettings

PlayerHistory

What the player history keeps, and for how long.

public PlayerHistorySettings PlayerHistory { get; set; }

Property Value

PlayerHistorySettings

Remarks

Shared with the copy ShallowCopy() makes, which is harmless: Settings replaces it with a new instance rather than editing it in place.

PlayitAgentId

The agent id that pairs with PlayitAgentSecretKey (tunnel origin).

public string? PlayitAgentId { get; set; }

Property Value

string

PlayitAgentSecretKey

Per-user self-managed agent secret key obtained from the partner setup-code flow (/v1/partner/create_agent). Used as the agent-key for all tunnel management. Stored encrypted at rest (like PlayitApiKey).

public string? PlayitAgentSecretKey { get; set; }

Property Value

string

PlayitApiKey

Legacy Playit key with write permission, used to create/delete tunnels. Superseded by the partner setup-code flow (PlayitAgentSecretKey); kept for users still on the old model.

public string? PlayitApiKey { get; set; }

Property Value

string

ReceiveBetas

The update check offers betas as well as stable versions. Off by default.

public bool ReceiveBetas { get; set; }

Property Value

bool

Remarks

Betas used to be offered to everybody, labelled as such. A beta is something to opt into, not something to decline every time it appears.

Methods

ShallowCopy()

A field-for-field copy.

public AppSettings ShallowCopy()

Returns

AppSettings

Remarks

Saving needs an instance with the secrets swapped for their encrypted form while the caller's copy keeps the usable plaintext. Building that by listing the properties by hand is what silently stopped MinimizeToTray and CloseToTray from ever being written: they were added to this class and nobody added them there. Copying everything means a new setting is persisted without touching the save path at all.