When using replaceitem on a player who is viewing a container, the item will not be placed in their inventory.
To test:
1. Make sure you are looking in a chest
2. Have a command block run (or another player run)
/replaceitem entity @a slot.armor.head stone
3. Exit chest to see the item did not get placed on your head.
Quoted from Maxaxik:
"In gamemode 2 it acts like an invisible item in the head slot, you can relog or put on a helmet to get the stone item.
In gamemode 1 it's acting up, relogging shows the item, but putting on a helmet makes it disappear."
Related issues
Comments


Tried this in 16w42a, both gamemodes 1 and 2
In gamemode 2 it acts like an invisible item in the head slot, you can relog or put on a helmet to get the stone item.
In gamemode 1 it's acting up, relogging shows the item, but putting on a helmet makes it disappear.

Dupe of MC-87019
Which gamemodes does this affect?