Destroy Item on pickup event

Hello I am writing a plugin that gives players in game currency for killing mobs.

The way this works is that the mob drops a gold nuggets and the player gets credits equal to half the mobs health when they pick up the gold nugget, however I am trying to destroy the bugget instead of them picking it up so they don’t get the nugget AND currency.

I am trying to damage the item to destroy it, however it still gets picked up, can anyone help me with what I’m doing wrong?

see my code below:

Okay I figured it out I used item.remove(); and event.setCancelled(true);