How to give an item one time by achievement ?

Started by zorualeloupsolitaire on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to give an item one time by achievement ?

Hi, for my mod I would like players to receive an item when they have a certain achievement that I have created.

The problem, as many have already experienced, is that either nothing happens, or the game considers that it must keep adding the item to the inventory since you have the success.

How can I get it to do this only once?

thanks in advance

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This worked for me: Global…
Sun, 02/16/2025 - 02:06

This worked for me:

Global Trigger: Player Completes Advancement

If: Has Entity/Target completed advancement [your achievement]

do: Execute command (/give @p......)

 

For my specific advancement, I have a procedure so it is earned upon joining the world. Then, once you gain the advancement, the item is given to the player using the command.