title: Bukkit Check Player's Inventory
body: <p>I'm trying to see if a player has any of the following items in their inventory, and if they do, I want to remove the items and send them a message saying  the item has been removed but I cannot figure out how to do it, this is what I have so far:</p>
  
  <pre><code>    Material[] bannedItems = { Material.DIAMOND_HELMET, Material.DIAMOND_CHESTPLATE, Material.DIAMOND_LEGGINGS, Material.DIAMOND_BOOTS, Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS };
  
  @EventHandler
  public void onInventoryClick(InventoryClickEvent event) {
      Player player = (Player) event.getWhoClicked();
      if(player.getInventory().contains(bannedItems, 1)){
          player.sendMessage(ChatColor.GRAY + "[" + ChatColor.RED + ChatColor.BOLD + "RPG" + ChatColor.GRAY + "] " + ChatColor.RED + "A has been removed from your possession.");
      }
  }
  </code></pre>
  
  <p>I get an error on the .contains(bannedItems, 1)) line.</p>
  
  <p>Thanks for the help!</p>