public static JSGob findMapObjectAbs(String name, int radius, Coord abs) {
        double min = radius;
        Gob min_gob = null;

        synchronized (glob.oc) {
            for (Gob gob : glob.oc) {
                double len = gob.position().dist(abs);
                boolean m = ((name.length() > 0 && gob.resname().contains(name)) || name
                        .length() < 1);
                if ((m) && (len < min)) {
                    min = len;
                    min_gob = gob;
                }
            }
        }
        if (min_gob != null)
            return new JSGob(min_gob.id);
        else
            return null;
    }