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?

1 Answer 1


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.

  • wouldn't this be inconsistent as the items might be killed before they are able to be used to execute the command?
    – DM01131
    Commented May 5, 2021 at 18:55
  • @DM01131 no, a chain conditional command blpck only executes after the repeating command block. Ill edit that in for clarification
    – Penguin
    Commented May 5, 2021 at 20:29
  • Oh ok I understand now - sorry I thought both commands would be in repeat command blocks or one would be in a normal chain (not conditional). While unlikely though, isn't there still the potential for two instances to occur, creating a glitch? Would you say this is too unlikely to pose a potential problem?
    – DM01131
    Commented May 6, 2021 at 21:02
  • @DM01131 that wont ever happen i have used these sorts of systems with long strings of command chains and they never have once failed
    – Penguin
    Commented May 7, 2021 at 3:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .