aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/io')
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt10
1 files changed, 10 insertions, 0 deletions
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)) {