Class PlayerEventParser
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
Turns a server log line into something a player did.
public static class PlayerEventParser
- Inheritance
-
PlayerEventParser
- Inherited Members
Remarks
One reader for the live console and for importing old logs, so the two cannot come to different conclusions about the same line. It is built from the console's own detectors — NameBefore(string, string), ChatOf(string, IReadOnlySet<string>) and DeathMessageDetector — and so inherits their rule: quoting something in chat never makes it look like that something happened.
The login line, Bob[/1.2.3.4:5678] logged in with entity id…, is never read. It is the one
that carries the player's IP address, and the history does not keep IP addresses.
Methods
Parse(string, IReadOnlySet<string>?)
What a player did in line, or null if it is not about a player.
public static PlayerEvent? Parse(string line, IReadOnlySet<string>? online)
Parameters
linestringThe line as the server wrote it.
onlineIReadOnlySet<string>Who is connected, to recognise a player's
/sayand/me.
Returns
UuidOf(string)
The player and UUID in UUID of player Bob is …, or null.
public static (string Player, string Uuid)? UuidOf(string line)
Parameters
linestring