I don't even try to debug methods anymore, there probs broken, and takes less time to create your own
I fucked up previous code ;)
Here is right code:
public static boolean hasJunk(Script s, String... notJunk) {
Item[] items = s.getInventory().getItems();
if (items == null || notJunk == null || notJunk.length <= 0)
return false;
for (Item item : items)
for (String notJunk : notJunk)
if (item != null && item.getName() != null && !item.getName().equals(notJunk))
return true;
return false;
}