The DisabledSolts attributes seems to have problems :
I tried to prohibit all the interactions with the armor stand except for the "remove" one for the hand and it didn't worked. Furthermore if i only allow to "replace" the item in hand, it works as if it was "remove" allowed. It couldn't switch two items but only take the item in hand of the armor stand with a free slot.
Linked issues
Comments 5
I used /summon armor_stand ~ ~ ~2 {Invisible:0b,ShowArms:1b,ArmorItems:[{},{},{},{}],HandItems:[{id:"flint",Count:1b},{}],DisabledSlots:2039582} for the "remove" version and /summon armor_stand ~ ~ ~2 {Invisible:0b,ShowArms:1b,ArmorItems:[{},{},{},{}],HandItems:[{id:"flint",Count:1b},{}],DisabledSlots:2039327} for the "replace" version
This could duplicate MC-94252, I am honestly unsure myself.
Both commands given are behaving exactly as expected according to this comment by @unknown.
In the first command, the main hand has the "disable remove" flag set. To fix this, DisabledSlots
should be set to 65566
instead (or just 30
since placing is always disabled for the main hand anyway).
In the second command, the main hand's "disable remove" flag is not set, which is why you were able to take the item. There's no such thing as a "replace" flag (see linked comment).
What is the command you used?