Command: /pickupfilter
After you type the command in chat an inventory will pop up, then you have to press on the anvil which is called *Add Item* and a anvil page will open, you will have to type the name of the thing you want to not be picked up or stuff you want to be picked up, for example ...