@Subscribe
public void onEvent(IEvent event) {
checkNotNull(event);
try {
if (event instanceof IWVWInitializedMatchEvent) {
final IWVWInitializedMatchEvent initializeEvent = (IWVWInitializedMatchEvent) event;
initializeEvent.getMatch().getChannel().register(this);
this.matchesMappedById.put(initializeEvent.getMatch().getId(), initializeEvent.getMatch());
this.matches.add(initializeEvent.getMatch());
this.worlds.add(initializeEvent.getMatch().getRedWorld());
this.worlds.add(initializeEvent.getMatch().getBlueWorld());
this.worlds.add(initializeEvent.getMatch().getGreenWorld());
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Added match with id=" + initializeEvent.getMatch().getId() + " to matches to synchronize.");
}
}
this.channel.post(event);
} catch (Exception e) {
LOGGER.fatal("Cought exception while handling of " + event, e);