Finding a player with a certain item and giving them another item [duplicate]
//ads -- adsterra.com -- native banner
?>
I'm working on a current map and this is the only hitch I'm at so far. I know that I can do a testfor command with a command block to see if anyone is holding a specific item, but I also want to give the person that has that item on them, a new item. For example, if someone has a diamond on them, I want to be able to, through command blocks, find that person and give them a blaze rod. Appreciate all help!
Pictures about "Finding a player with a certain item and giving them another item [duplicate]"
How do you Testfor a player holding an item?
Open the inventory. Click on the item you want to duplicate to pick it up. Hold your mouse's scroll wheel button and drag it over empty inventory slots to duplicate it as stacks in your inventory.How do you duplicate items in Minecraft with commands?
Item data tagsHow i Got 999 Nether Star in Skyblock Very Rare Items Duplicate Skyblock BlockmanGo
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Karolina Grabowska, Andrea Piacquadio, cottonbro, Ketut Subiyanto