3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 13:30:17 +01:00

Merge pull request #115 from lolnetnz/crash

Prevent commands run from console crashing the entire instance
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-10-12 21:44:15 -04:00 committet von GitHub
Commit 1f329b09f3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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