Add crash operation to command
All checks were successful
push-build-apidoc / build (push) Successful in 1m42s
push-build-apidoc / generate-javadoc (push) Successful in 1m52s

This commit is contained in:
JeremyStar™ 2024-11-09 22:46:20 +01:00
parent 5c4b4beedf
commit 156b027ff2
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -20,6 +20,7 @@
package de.staropensource.engine.minecraft.command;
import de.staropensource.engine.base.EngineConfiguration;
import de.staropensource.engine.base.logging.Logger;
import de.staropensource.engine.base.utility.ListFormatter;
import de.staropensource.engine.base.utility.Miscellaneous;
import de.staropensource.engine.base.utility.PlaceholderEngine;
@ -223,6 +224,7 @@ public final class Command {
message(player, message);
}
case "crash" -> Logger.crash("Manually initiated crash (/enginemc crash)");
default -> message(player, Strings.errorInvalidArgument);
}
}
@ -269,7 +271,8 @@ public final class Command {
<red><bold>config</bold> \\<key> [value]: Displays the value of a setting if <italic>value</italic> is unset, or sets it if it isn't
<red><bold>placeholder</bold> \\<message>: Runs the specified message through sos!engine's PlaceholderEngine and returns it's result
<red><bold>gc</bold>: Forcefully invokes the garbage collector
<red><bold>jvminfo</bold>: Displays information about the Java Virtual Machine""";
<red><bold>jvminfo</bold>: Displays information about the Java Virtual Machine
<red><bold>crash</bold>: Crashes the StarOpenSource Engine""";
// Configuration
public static final String configGet = "<red>The configuration setting \"%key%\" is set to '%value%'";