public boolean addObject(int x, int y, int width, int length, int height) {
        if ((x - width) > 0 || (x + width) < map.length || (y - length) > 0 || (y + length) < map[0].length) {
            for (int i = x - (width / 2); i < x + (width / 2); i++) {
                for (int j = y - (length / 2); j < y + (length / 2); j++) {
                    try{
                        this.map[i][j] = height;
                    }catch(Exception e){
                        System.err.println("Object is outside this map.");
                    }
                }
            }
            return true;
        }
        return false;
    }