Class CrashReportService
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
Looks for a Minecraft server crash report relevant to the server's most recent run, to show a short human-readable reason alongside "the server exited unexpectedly" instead of just an exit code. Vanilla/Fabric/Forge/Paper all write crash reports to "<folder>/crash-reports/" with a stable, decade-old format: a "---- Minecraft Crash Report ----" header followed by a "Description: ..." line summarizing what went wrong.
public class CrashReportService
- Inheritance
-
CrashReportService
- Inherited Members
Methods
FindRecentCrashReason(string, DateTime)
Returns the short reason from the newest crash report under "<folder>/crash-reports/",
if one was written at or after sinceUtc (so a stale report from an earlier,
unrelated crash isn't picked up). Null if there's no crash-reports folder or nothing recent.
public string? FindRecentCrashReason(string folder, DateTime sinceUtc)