0

I am making a bed wars map and I wanna make it so when the player clicks a button, it give them 16 wool and takes away 4 iron. I have found out how to take only a specific item but how do I take a specific amount? For example, how I have it set up now, no matter how much iron the player has, it takes it all and only gives 16 wool. I want it to only take 16 at a time.

  • If you struggle with that, maybe you should try a smaller project first. Just entering your question title should have given you the answer. – Fabian Röling Mar 24 '18 at 10:31
1

Basically, the command is similar to /give; after you specify the item you need to specify the variant and amount. In this case, it would be

/clear @p minecraft:iron_ingot 0 4

0 is the variant, which in iron ingots there are none, but in things like colored blocks may need to be changed. The 4 is the amount.

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.