In a bowl, whisk together the flour, ground cinnamon, allspice, nutmeg, black pepper, cloves, baking soda, and salt.
In a mixer, beat the butter, brown sugar, granulated sugar, and molasses on medium speed until the mixture is light and fluffy. Add the egg, anise extract, and vanilla extract, and beat until just combined.
Slowly add the dry ingredients to the wet mixture, stirring until just mixed. Wrap the dough in plastic wrap and chill in the refrigerator for at least 3 hours.
Preheat your oven to 350°F and line baking sheets with parchment paper. Scoop about 1 tablespoon of dough and roll into 1 1/2-inch balls, spacing them 2 inches apart on the sheets.
Bake for about 14-17 minutes until cookies are golden and firm with slight cracks.
Let cool on the baking sheet for 5 minutes, then roll the cookies while still slightly warm in the confectioners' sugar. Transfer to a wire rack to cool completely.