Minecraft – How to prevent players from editing armor stands

minecraft-commandsminecraft-java-edition

I am trying to make a kit PvP map. In the map I want the players to see different kits/classes represented by armor stands with various equipment on them, to represent the kit. The players will be in adventure mode, and I want to know how to stop them from stealing the items from the armor stands. I know about the {Invulnerable:1b} tag to make the players unable to break the armor stands, but I do not know of a tag that makes the armor stands unable to be edited (taking off armor, weapons etc.)

Thanks!

Best Answer

Use the DisabledSlots tag. To make an armor stand that players cannot change, use the tag {DisabledSlots:2096896}. Note that the number 2096896 is the sum of the flag numbers.

Refer to this post on Reddit that lists out the flag numbers for slots that can be disabled. To use multiple flags, use the sum of the desired flag numbers.