13
0
geforkt von Mirrors/Velocity

Add logging to command executions by players

Dieser Commit ist enthalten in:
Tim 2020-07-19 19:46:10 +02:00
Ursprung 21ad6a433f
Commit a9df92d308

Datei anzeigen

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