Simplified command logging

This commit is contained in:
lieght
2025-09-10 21:28:05 +02:00
parent de66133b66
commit f760c37b8a

View File

@@ -21,15 +21,7 @@ public class Main {
server.setBackend(Server.ServerBackend.REMOTE);
GlobalEventBus.subscribeAndRegister(Events.ServerEvents.OnCommand.class, e -> {
if (e.command() == Server.Command.LOGIN) {
logger.info("LOGIN command -> {}", String.join(" ", e.args()));
}
else if (e.command() == Server.Command.HELP) {
logger.info("HELP command -> {}", String.join(" ", e.args()));
}
else {
logger.info(e.command().toString());
}
logger.info("Command sent to server: {} with args: {}", e.command(), e.args());
});
GlobalEventBus.post(new Events.ServerEvents.command(Server.Command.HELP, "test", "test2"));