From f877ce10737f657fadab950d7fc7f5aee9e53d6c Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Tue, 3 Oct 2023 06:15:40 +1100 Subject: Add game directory to crash reports (#847) * added /neudevtest crash * Add game directory to crash reports --- .../moulberry/notenoughupdates/commands/dev/DevTestCommand.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt index e138b512..cf55416b 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt @@ -265,6 +265,16 @@ class DevTestCommand { NotEnoughUpdates.INSTANCE.config.hidden.customUserAgent = null } }.withHelp("Reset the custom user agent") + thenLiteral("crash") { + thenExecute { + throw object : Error("L") { + @Override + fun printStackTrace() { + throw Error("L") + } + } + } + }.withHelp("Crash the game") } hook.beforeCommand = Predicate { if (!canPlayerExecute(it.context.source)) { -- cgit