public void onLogin(Player player){
  List<Achievement> toCheck=new ArrayList<Achievement>();
  final Map<Category,List<Achievement>> map=new HashMap<Category,List<Achievement>>(achievements);
  map.remove(Category.OUTSIDE_ZONE);
  map.remove(Category.UNDERGROUND_ZONE);
  Collection<List<Achievement>> values=map.values();
  for (  List<Achievement> list : values) {
    toCheck.addAll(list);
  }
  final List<Achievement> reached=checkAchievements(player,toCheck);
  if (!reached.isEmpty()) {
    StringBuilder sb=new StringBuilder();
    sb.append("You have reached ");
    sb.append(Integer.valueOf(reached.size()));
    sb.append(" new " + Grammar.plnoun(reached.size(),"achievement") + ". Please check #http://stendhalgame.org for details.");
    player.sendPrivateText(sb.toString());
  }
}

public void onLogin ( Player player ) { List < Achievement > toCheck = new ArrayList < Achievement > ( ) ; final Map < Category , List < Achievement > > map = new HashMap < Category , List < Achievement > > ( achievements ) ; map . remove ( Category . OUTSIDE_ZONE ) ; map . remove ( Category . UNDERGROUND_ZONE ) ; Collection < List < Achievement > > values = map . values ( ) ; for ( List < Achievement > list : values ) { toCheck . addAll ( list ) ; } final List < Achievement > reached = checkAchievements ( player , toCheck ) ; if ( ! reached . isEmpty ( ) ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "You have reached " ) ; sb . append ( Integer . valueOf ( reached . size ( ) ) ) ; sb . append ( " new " + Grammar . plnoun ( reached . size ( ) , "achievement" ) + ". Please check #http://stendhalgame.org for details." ) ; player . sendPrivateText ( sb . toString ( ) ) ; } }
checks on login of a player which achievements the player has reached and gives a summarizing message
