mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 02:44:50 +00:00
Simplified command logging
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user