Minecraft – How to summon villager with locked trades in Minecraft 1.14, 1.15.2, or 1.16

minecraft-commandsminecraft-java-edition

I want to make villager that has locked trades. I would use it in maps, but i have unfinished map for 1.16, and when its done I'm going to make map for 1.14 or 1.15.2 (Not sure for version I'm going to do it).
In the 1.16 map's command block I'm using command:

summon minecraft:villager ~ ~ ~ {PersistenceRequired:1b,Offers:{Recipes:[{buy:{id:gold_nugget,Count:7,tag:{display:{Name:"\"Coin\"",Lore:["\"Final Game\""]}}},sell:{id:diamond_shovel,Count:1,tag:{Enchantments:[{id:knockback,lvl:57}]}},maxUses:10}]},VillagerData:{profession:librarian,level:2,type:plains},NoAi:1,NoGravity:1,Health:1}

I am going to add more trades, but I'm gonna make 5th trade and upper trades locked when the villager is summoned.

Best Answer

Villager trades have an NBT tag called uses which, when set to the value of maxUses, disables the trade.