Updated:

Trimmed armor (Java 1.20.5+)

/give @p diamond_chestplate[trim={material:"gold",pattern:"sentry"}] 1

pattern is the design and material its color.

Pattern IDs

IDTemplate found in
sentryPillager outpost
duneDesert pyramid
coastShipwreck
wildJungle temple
ward, silenceAncient city
eyeStronghold
vexWoodland mansion
tideOcean monument (elder guardian)
snoutBastion remnant
ribNether fortress
spireEnd city
wayfinder, shaper, raiser, hostTrail ruins
flow, boltTrial chambers (1.21)

Materials

quartz, iron, netherite, redstone, copper, gold, emerald, diamond, lapis, amethyst and resin (1.21.4+). A material that matches the armor is shown slightly darker so it still stands out.

Give the templates

/give @p sentry_armor_trim_smithing_template 1
/give @p netherite_upgrade_smithing_template 1

Trim templates are named <pattern>_armor_trim_smithing_template. Give templates instead of finished armor when players should use the smithing table themselves.

Trim and enchantments together

/give @p netherite_helmet[trim={material:"diamond",pattern:"spire"},enchantments={protection:4,unbreaking:3}] 1

This uses the 1.21.5+ enchantment format. For a full set, see the strongest armor guide.

Older Java and Bedrock

Java 1.20.4 and earlier used NBT: {Trim:{material:"gold",pattern:"sentry"}}. Bedrock /give cannot add trims, so give the template and use a smithing table. The trim generator writes all four pieces at once.

Common questions

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.