if ( location.equals(nextPoint) ){ if ( route.getType().equals("bus") ){ BusRoute busRoute = (BusRoute)route; if (busRoute.getStops().contains(location)){ try { Thread.sleep(1000); } catch (Exception e){ System.out.println("Bus thread exception"); } } } path.remove(0); if ( path.isEmpty() ){ destinationReached = true; //mc.vehicleParked(mc.getVehicle(id)); } else { nextPoint = path.get(0); } }