TransWikia.com

How can I give points when someone is standing near an item using Minecraft commands?

Arqade Asked on July 11, 2021

I’m making a kit pvp and am using scoreboard as my points.

How do I make it so when a player is standing near an item, it gives them 1 point then the item disappears?

2 Answers

/execute as @a store success successscore to 1* run clear @s *youritem*  
/*add point too* [scores={successscore=1..}]  
/*set scoreboard of [scores={successscore=1..}] back to 0  

These are not the exact commands, but you get the point

Answered by GalaxyLinus on July 11, 2021

Here is just "an item":

execute @e[type=item] ~ ~ ~  scoreboard players add @p MYOBJ 1
kill @e[type=item]

Or for an item named Apple:

execute @e[type=item,name="Apple"] ~ ~ ~ scoreboard players add @p MYOBJ 1
kill @e[type=item,name="Apple"]

The first command should be in a repeating always active command block and the second in a chain always active conditional.

Answered by Penguin on July 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP