From ec793a9fdbbf66fcce31fe544e8f0208cb9f9520 Mon Sep 17 00:00:00 2001 From: Joo200 Date: Wed, 24 Sep 2025 07:50:05 +0200 Subject: [PATCH] Log console command executions (#1137) --- .../com/velocitypowered/proxy/console/VelocityConsole.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/console/VelocityConsole.java b/proxy/src/main/java/com/velocitypowered/proxy/console/VelocityConsole.java index fe360d4d..90b6292f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/console/VelocityConsole.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/console/VelocityConsole.java @@ -136,6 +136,10 @@ public final class VelocityConsole extends SimpleTerminalConsole implements Cons if (!this.server.getCommandManager().executeAsync(this, command).join()) { sendMessage(Component.translatable("velocity.command.command-does-not-exist", NamedTextColor.RED)); + return; + } + if (server.getConfiguration().isLogCommandExecutions()) { + logger.info("CONSOLE -> executed command /{}", command); } } catch (Exception e) { logger.error("An error occurred while running this command.", e);