Package de.justi.yagw2api.wrapper

Examples of de.justi.yagw2api.wrapper.IWVWInitializedMatchEvent


  @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);
View Full Code Here

TOP

Related Classes of de.justi.yagw2api.wrapper.IWVWInitializedMatchEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.