Add logging to command executions by players
This commit is contained in:
@@ -129,6 +129,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
server.getCommandManager().callCommandEvent(player, msg.substring(1))
|
server.getCommandManager().callCommandEvent(player, msg.substring(1))
|
||||||
.thenComposeAsync(event -> processCommandExecuteResult(originalCommand,
|
.thenComposeAsync(event -> processCommandExecuteResult(originalCommand,
|
||||||
event.getResult()))
|
event.getResult()))
|
||||||
|
.whenCompleteAsync((ignored, throwable) -> {
|
||||||
|
logger.info("{} -> executed command /{}", player.getUsername(), originalCommand);
|
||||||
|
})
|
||||||
.exceptionally(e -> {
|
.exceptionally(e -> {
|
||||||
logger.info("Exception occurred while running command for {}",
|
logger.info("Exception occurred while running command for {}",
|
||||||
player.getUsername(), e);
|
player.getUsername(), e);
|
||||||
|
Reference in New Issue
Block a user