title: Remove ItemStack from a player
body: <p>how are you, good morning, I'm sorry for the inconvenience, someone would be so kind to help me figure out why I can't remove an item by right clicking?</p>
  <p>Sorry to bother you.</p>
  <pre><code>@EventHandler
  public void onInteract(PlayerInteractEvent e) {
      Player p = (Player) e.getPlayer();
      ItemStack m = new ItemStack(Material.GOLD_NUGGET, 1);
      if (e.getAction().equals(Action.RIGHT_CLICK_AIR)) {
          if (e.getPlayer().getItemInHand().getType().equals(m)){
              p.getInventory().removeItem(m);
                  p.sendMessage(&quot;-1&quot;);
          }else {
                   p.sendMessage(&quot;error&quot;);
               }
      }
  }
  </code></pre>