private List<Achievement> checkAchievements(Player player,List<Achievement> toCheck){
  List<Achievement> reached=new ArrayList<Achievement>();
  if (!player.arePlayerAchievementsLoaded()) {
    return reached;
  }
  for (  Achievement achievement : toCheck) {
    if (achievement.isFulfilled(player) && !player.hasReachedAchievement(achievement.getIdentifier())) {
      logReachingOfAnAchievement(player,achievement);
      if (achievement.isActive()) {
        reached.add(achievement);
      }
    }
  }
  return reached;
}

private List < Achievement > checkAchievements ( Player player , List < Achievement > toCheck ) { List < Achievement > reached = new ArrayList < Achievement > ( ) ; if ( ! player . arePlayerAchievementsLoaded ( ) ) { return reached ; } for ( Achievement achievement : toCheck ) { if ( achievement . isFulfilled ( player ) && ! player . hasReachedAchievement ( achievement . getIdentifier ( ) ) ) { logReachingOfAnAchievement ( player , achievement ) ; if ( achievement . isActive ( ) ) { reached . add ( achievement ) ; } } } return reached ; }
checks for each achievement if the player has reached it . in case of reaching an achievement it starts logging and notifying about reaching .
