Table of Contents

Class DeathMessageDetector

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Detects Minecraft death/kill messages in a server console line, for the "deaths" notification. Best-effort and English/vanilla-oriented: the server's locale or plugins may word some deaths differently. Pairing a death-phrase match with a "subject is a valid player name" check keeps it from firing on chat lines (which start with a "<name>" tag) or other log output.

public static class DeathMessageDetector
Inheritance
DeathMessageDetector
Inherited Members

Methods

Detect(string)

Returns the death message (e.g. "Alice was slain by Bob") if line is a vanilla death log entry, or null. The message part (after the "]: " log prefix) must be "<valid player name> <death phrase>…": the phrase has to come immediately after the name, not merely appear somewhere in the line — so a plugin/chat line that only mentions a keyword ("the player Steve died in tutorial") doesn't fire a false death.

public static string? Detect(string line)

Parameters

line string

Returns

string