I can't get it to work, i have an itemstack in a players inventory called is and i CANT REMOVE IT from the inventory, is.setMaterial(null) nope, p.getInventory().remove(is) nope... I have no idea what to do now... Please help me!
You'll want to use inventory.removeItem(itemstack), the remove(itemstack) method only removes Items from slots that match the argument passed exactly, including the item's amount.