recipe removing dupes items?

I made a datapack for my friend's server that allows only one mace to be crafted but when it is crafted it duplicates the remaining items

Continue to help post