Пример #1
0
 /**
  * Gets the unit.
  *
  * @param id the Unit Identifier
  * @return the unit
  */
 public static Unit getUnit(UnitIdentifier id) {
   for (Player p : getPlayers().values()) {
     if (!p.isSpectator() && p.getParty().getColor().equals(id.partyColor)) {
       return p.getParty().search(id.name);
     }
   }
   return null;
 }