I have looked at this for hours and I cannot find out what the issue is.

I am currently working on a herblore class and trying to make it more efficient. I have made a method to check my Herb array that is setup like so:

Code:
     public boolean checkArray(int[][] array, String type, int id) {
          for(int i = 0; i < array.length; i++) {
               if(type.equals("herb")) {
                    if(array[i][0] == id) {
                         return true;
                    }
               } else if(type.equals("unf")) {
                    if(array[i][1] == id) {
                         return true;
                    }
               } else if(type.equals("sec")) {
                    if(array[i][2] == id || array[i][3] == id) {
                         return true;
                    }
               }
          }
          return false;
     }
However, when I use it in my ItemOnItem class in my source to check an array if an item is in it ..for some reason it doesn't work correctly. The conditions don't even run. Example:

Code:
if ((c.doHerb().checkArray(Herblore.herbArray, "herb", itemUsed)) && (useWith == 227)) {
     c.doHerb().startPot(itemUsed, 3283);
}
If I do use an item that is in that part of the array..it doesn't work. Any ideas?