Select players with empty inventory slot

Select players with empty inventory slot - Person choosing document in folder

Is it possible to testfor players with a specific inventory slot (more specific the 100th/boots slot) if it is empty. I have tried

/testfor @a {Inventory:[{Slot:100b}]}, 

and

/testfor @a {Inventory:[100:{}]}

and

/testfor @a {Inventory:[{Slot:100b,id:"minecraft:air"}]}

but none of them work.






Pictures about "Select players with empty inventory slot"

Select players with empty inventory slot - Seven White Closed Doors
Select players with empty inventory slot - Person taking white paper from folder
Select players with empty inventory slot - Contemporary cafe with wooden shelves full of many bottles and menu on wall



How do you clear specific inventory slots in Minecraft?

There is no way to remove items if they are moved with the cursor, as far as I am aware, due to the fact that it doesn't have a slot id. However clearing all other slots of a specific item and killing all dropped items is possible, using /replaceitem .

How do you know if a Minecraft slot is empty?

If a dropper slot is empty it means the corresponding compound tag with property Slot does not exist. Use /execute unless data to check if the slot is empty: execute unless data block 12 23 34 Items[{Slot:0b}] run ... Is it possible to check multiple slots in a single command by using an "execute unless ...



Get Selected Inventory Slot - Minecraft 1.8




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Anete Lusina, Pixabay, Anete Lusina, Rachel Claire