Example #1
0
 /**
  * Finds store customers by name and sorts them by distance
  *
  * @return RSNPC[] containing customers
  */
 private RSNPC[] getCustomers() {
   return NPCs.findNearest(
       NPCs.generateFilterGroup(
           new Filter<RSNPC>() {
             @Override
             public boolean accept(RSNPC npc) {
               if (npc != null) {
                 String name = npc.getName();
                 return name != null && name.equals("Shop keeper") || name.equals("Shop assitant");
               }
               return false;
             }
           }));
 }