-1

I'm using the website minecraft.tools to help create a book, in which the user clicks the text and is given an item. I created the text that says "> Click for Reward" and added a Click Event, that gives the user an item. But I want it when the user only clicks on it once, instead of multiple times, by which they can get the item repeatedly.

The command for Click Event is /give @p economyinc:item_oneb

Minecraft Java, playing version 1.14.4

2

Create a dummy scoreboard objective, call it something along the lines of hasClaimedReward. When giving the item to the player, only give it to them if they have a hasClaimedReward score of 0:

/execute as @p if @s[scores={hasClaimedReward=..0}] run give @s <item>

Afterwards, set their hasClaimedReward score to 1.

It would be best to just make the book trigger a function to handle this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.