public int remainingKills(Player player,String creature){
  final List<String> tokens=Arrays.asList(questState.split(","));
  if ((tokens.size() % 5) != 0) {
    LOGGER.error("Wrong record in quest slot of player " + player.getName() + ": ["+ questState+ "]");
    return -1;
  }
  for (int i=0; i < tokens.size() / 5; i++) {
    final String creatureName=tokens.get(i * 5);
    if (creature.equals(creatureName)) {
      List<String> tokensForCreature=tokens.subList(i * 5,i * 5 + 5);
      return remainingKills(player,tokensForCreature);
    }
  }
  LOGGER.warn("Player " + player.getName() + " was not requested to kill any "+ creature);
  return -1;
}

public int remainingKills ( Player player , String creature ) { final List < String > tokens = Arrays . asList ( questState . split ( "," ) ) ; if ( ( tokens . size ( ) % 5 ) != 0 ) { LOGGER . error ( "Wrong record in quest slot of player " + player . getName ( ) + ": [" + questState + "]" ) ; return - 1 ; } for ( int i = 0 ; i < tokens . size ( ) / 5 ; i ++ ) { final String creatureName = tokens . get ( i * 5 ) ; if ( creature . equals ( creatureName ) ) { List < String > tokensForCreature = tokens . subList ( i * 5 , i * 5 + 5 ) ; return remainingKills ( player , tokensForCreature ) ; } } LOGGER . warn ( "Player " + player . getName ( ) + " was not requested to kill any " + creature ) ; return - 1 ; }
tells the number of times the specified player still needs to kill the specified kind of creature in order to fulfill the quest ' s requirements .
