From a9df92d30862ee7a1b4470cd76073eacf2050e76 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 19 Jul 2020 19:46:10 +0200 Subject: [PATCH] Add logging to command executions by players --- .../proxy/connection/client/ClientPlaySessionHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java index bacb098e1..87b0e849b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java @@ -129,6 +129,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler { server.getCommandManager().callCommandEvent(player, msg.substring(1)) .thenComposeAsync(event -> processCommandExecuteResult(originalCommand, event.getResult())) + .whenCompleteAsync((ignored, throwable) -> { + logger.info("{} -> executed command /{}", player.getUsername(), originalCommand); + }) .exceptionally(e -> { logger.info("Exception occurred while running command for {}", player.getUsername(), e);