Package org.groovymud.utils

Examples of org.groovymud.utils.CountingMap


      }
    }
  }

  protected void checkPlayerHandles() {
    CountingMap netDead = getNetDeadPlayers();
    Set<Player> totallyDead = netDead.getKeysAbove(30);

    for (Player p : totallyDead) {
      p.removeStatus(NET_DEAD_STATUS);
      p.dest(false);
      getNetDeadPlayers().remove(p);
View Full Code Here


  }

  protected void handleTheNetDead() {

    Iterator<LoginShell> x = new HashSet<LoginShell>(getObjectRegistry().getActivePlayerHandles()).iterator();
    CountingMap netDead = getNetDeadPlayers();
    while (x.hasNext()) {
      LoginShell shell = x.next();
      if (!shell.getConnection().isActive()) {
        Player p = getObjectRegistry().getPlayerByHandle(shell);
        if (!netDead.containsKey(p)) {
          // not a good way to do it.. but how.. ?
          logger.info(p.getName() + " is net dead..");
          p.addStatus(NET_DEAD_STATUS);
        }
        netDead.increment(p);
      }
    }
  }
View Full Code Here

      }
    }
  }

  protected void checkPlayerHandles() {
    CountingMap netDead = getNetDeadPlayers();
    Set<Player> totallyDead = netDead.getKeysAbove(30);

    for (Player p : totallyDead) {
      p.removeStatus(NET_DEAD_STATUS);
      p.dest(false);
    }
View Full Code Here

  }

  protected void handleTheNetDead() {

    Iterator<LoginShell> x = new HashSet<LoginShell>(getObjectRegistry().getActivePlayerHandles()).iterator();
    CountingMap netDead = getNetDeadPlayers();
    while (x.hasNext()) {
      LoginShell shell = x.next();
      if (!shell.getConnection().isActive()) {
        Player p = getObjectRegistry().getPlayerByHandle(shell);
        if (!netDead.containsKey(p)) {
          // not a good way to do it.. but how.. ?
          logger.info(p.getName() + " is net dead..");
          p.addStatus(NET_DEAD_STATUS);
        }
        netDead.increment(p);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.groovymud.utils.CountingMap

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.