Is there any way to test if a Players inventory is not full in Minecraft

Is there any way to test if a player's inventory is not full (eg. atleast 1 empty slot anywhere in the inventory, not counting Armor Slots) with command blocks and whatnot?
Best Answer
I found /testfor @p {Inventory:[{Slot:0b}]}, which outputs a 1 block signal if there's an item there, and no signal if that slot is empty. This would require 36 command blocks, to check every slot (including the hotbar; 27 to just check the inventory, 40 if you wanted to check armor slots)
Pictures about "Is there any way to test if a Players inventory is not full in Minecraft"



Can you check player inventory Minecraft?
In Minecraft Vanilla 1.12. 2 you can't look up other player's inventories, you can only test if a certain item is in it. But in 1.13 (and already in the snapshots) you can use /data get entity <player> to get all data of a player. If you add Inventory to it, it only shows the inventory.Minecraft - Check For A Specific Item NOT Being In The Player's Inventory!
More answers regarding is there any way to test if a Players inventory is not full in Minecraft
Answer 2
This solution works for 1.14 for sure, I have not tested for 1.13. It can be elaborated on to check the entire inventory in one command; however, in this example I am only checking the hotbar.
/execute if entity @p[nbt={Inventory:[{Slot:0b},{Slot:1b},{Slot:2b},{Slot:3b},{Slot:4b},{Slot:5b},{Slot:6b},{Slot:7b},{Slot:8b}]}] run say Hotbar is not full.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: veeterzy, Joshua Welch, Tima Miroshnichenko, Greta Hoffman