Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2025-01-11 15:41:14 +01:00
Prevent commands run from console crashing the entire instance
Dieser Commit ist enthalten in:
Ursprung
668725759a
Commit
64682027a5
@ -68,9 +68,13 @@ public final class VelocityConsole extends SimpleTerminalConsole implements Comm
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void runCommand(String command) {
|
protected void runCommand(String command) {
|
||||||
|
try {
|
||||||
if (!this.server.getCommandManager().execute(this, command)) {
|
if (!this.server.getCommandManager().execute(this, command)) {
|
||||||
sendMessage(TextComponent.of("Command not found.", TextColor.RED));
|
sendMessage(TextComponent.of("Command not found.", TextColor.RED));
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("An error occurred while running this command.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren