Mojira Archive
MC-121173

SelectedItem not working?

So, I'm trying to make a AFK detector for a server I'm playing on and I'm stumbling on a problem. The contraption is split up in two parts: detecting that a player is standing under a block (emerald block) and detecting a player that is holding a red wool block. After those checks are done, and a player has been found, he'll be marked AFK by set in a created team called 'AFK.' In that team the player's name turns red because of the team color. The first part works just fine, but the second part I'm struggeling with to understand. I'm using the following command to detect that a player holds a red wool block:

scoreboard players set @a AFK_Check2 1 {SelectedItem:{Item:

{id:"minecraft:wool",Count:1b,Damage:14s}

}}

As shown in the pictures... It isn't detecting that I'm holding it.

I hope this can be resolved.

Invalid

Oscar Wellner

2017-10-17, 04:36 PM

2017-10-17, 05:54 PM

2017-10-17, 05:54 PM

0

1

Unconfirmed

Minecraft 1.12.2

-