geforkt von Mirrors/Velocity
Merge pull request #115 from lolnetnz/crash
Prevent commands run from console crashing the entire instance
Dieser Commit ist enthalten in:
Commit
1f329b09f3
@ -68,8 +68,12 @@ public final class VelocityConsole extends SimpleTerminalConsole implements Comm
|
||||
|
||||
@Override
|
||||
protected void runCommand(String command) {
|
||||
if (!this.server.getCommandManager().execute(this, command)) {
|
||||
sendMessage(TextComponent.of("Command not found.", TextColor.RED));
|
||||
try {
|
||||
if (!this.server.getCommandManager().execute(this, command)) {
|
||||
sendMessage(TextComponent.of("Command not found.", TextColor.RED));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("An error occurred while running this command.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren