Minecraft – How to summon an entity with several tags

minecraft-commandsminecraft-java-edition

Like the title says, I want to summon a villager with several tags from the start. This is because I have several villagers with the tag extra, so I can't add tag CorpFred to a villager with the tag extra because then all villagers with that tag will also have CorpFred. So, how would you summon a villager with several tags? (Note this is for version 1.9.4)

/summon Villager ~ ~ ~ {Offers:{},Tags:["extra"],CustomName:"Corporal Frederickson",NoAI:1b}

If you could add the tag CorpFred to this /summon command, I would be highly grateful.

Best Answer

Tags is just a list, [], of strings, "". To add multiple elements to a list, separate them with commas:

/summon Villager ~ ~ ~ {Offers:{},Tags:["extra","CorpFred"],CustomName:"Corporal Frederickson",NoAI:1b}