Updated:
Make an item shimmer (no enchantments)
/give @p minecraft:nether_star[enchantment_glint_override=true]
On Java 1.20.5+, add the glint without any enchantment, which suits tickets and prize items. With a name too: [enchantment_glint_override=true, (see custom items).
/give @p minecraft:diamond_sword[enchantments={sharpness:5},enchantment_glint_override=false]
Set it to false to hide the glint on an enchanted item.
On 1.20.4 and older, the usual trick was an empty enchantment list: {Enchantments:[{}]}.
Outline mobs and players (Glowing)
/effect give @e[type=minecraft:cow,distance=..20] minecraft:glowing 30 0 true
The Glowing effect draws a white outline that shows through walls, for 30 seconds here. Use infinite to keep it on.
/data merge entity @e[type=minecraft:cow,limit=1,sort=nearest] {Glowing:1b}
For mobs you can also set the Glowing:1b tag. Unlike the effect, it never wears off until you set Glowing:0b. Player data cannot be changed with /data, so use the effect for players (see the data command).
Change the outline color
/team add red
/team modify red color red
/team join red @e[type=minecraft:cow,limit=1,sort=nearest]
The outline takes the color of the target's team. Color teams red and blue and players can tell friend from foe through walls (see the team command).
Ideas
- Hide and seek: give hiders Glowing for the last 30 seconds.
- Boss fights: outline the boss so players can find it (see boss mobs).
- Prizes: hand out shimmering special items.
Turn it off
/effect clear @a minecraft:glowing
/data merge entity @e[type=minecraft:cow,limit=1,sort=nearest] {Glowing:0b}
Bedrock Edition
Bedrock has neither the Glowing effect nor a glint-only option. To make an item shimmer, give it a real enchantment with /enchant.
Common problems
- No glint: on 1.20.4 or older,
[ ]component syntax does not work. - Glowing tag does nothing: check the
bin1band that the selector picks one entity. - Color does not change: set the team color before joining, and check the target actually joined.
Common questions
- Does Invisibility hide a glowing player? No. The outline stays visible; clear Glowing too.
- Can blocks glow? Blocks cannot get an outline. For light, use light sources or the invisible light block.
- Is it unfair in PvP? It reveals positions through walls, so use it as a rule, such as only at the end of hide and seek.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.