-
Bug
-
Resolution: Duplicate
-
None
-
1.19.11 Hotfix, 1.19.20
-
None
-
Confirmed
-
Multiple
What I Expected to Happen (The Bug)
/say @a[hasitem=\{item=air,location=slot.armor.chest}]
The above command would be expected to list the names of every online player who has nothing in their chest armor slot, but it doesn't list anyone at all, just making the player running it send a blank /say message.
Testing for air in any slot will result in the response "No targets matched selector" when using /execute with the sendcommandfeedback gamerule set to true. An example:
/execute @a[hasitem=\{item=air,location=slot.armor.chest}] ~~~ say No Chestplate
/execute as @a[hasitem=\{item=air,location=slot.armor.chest}] run say No Chestplate (With Upcoming Creator Features Enabled)
Working Case of hasitem with Iron Chestplates
/say @a[hasitem=\{item=iron_chestplate,location=slot.armor.chest}]
The above command works as expected, listing the names of every online player who has an iron chestplate in their chest armor slot in the /say message.
- duplicates
-
MCPE-155675 Hasitem filter allows ‘air’ to be inputted as an item but filter cannot detect it
- Reopened