Class PropertiesSavedWhileRunning
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
The server.properties values saved while the server was running, to be written again when
the server overwrites them.
public sealed class PropertiesSavedWhileRunning
- Inheritance
-
PropertiesSavedWhileRunning
- Inherited Members
Remarks
A running Minecraft server keeps the properties it loaded at start in memory, and whenever its
whitelist is switched (whitelist on/off) it writes all of them back to the file.
Whatever the settings page had saved since — a new MOTD, more players — was silently put back the
way it was, the moment somebody used the switch on the Players tab.
So the app remembers what it saved while the server ran, and writes it again after each of those
commands. white-list itself is never remembered: it is what the command just set, and
putting back an older value would undo the switch. Forgotten when the server stops, since the next
start reads the file as it is.
Methods
Clear()
The server stopped: the next start reads the file as it is.
public void Clear()
Note(IReadOnlyDictionary<string, string>)
Remembers changes, saved just now with the server running.
public void Note(IReadOnlyDictionary<string, string> changes)
Parameters
changesIReadOnlyDictionary<string, string>
ToRestore()
What to write again after the server rewrote the file; empty when nothing is owed.
public Dictionary<string, string> ToRestore()