This is what is want to hide.

The "minecraft:diamond_sword" and "NBT : 2 tag(s)" seems to be unhidable but I've seen many servers with this hidden. So how do you hide these? And if this requires a plugin, which plugin?


1 Answer 1


Looks like you need to use HideFlags to remove those values.

The Minecraft Wiki has information on this:

Used to hide flags (the info in the tool tip) such as enchantments, CanDestroy, CanPlaceOn, etc.

To hide multiple tags, you need to add the value of the tags you want to hide. For example, if you want to hide the "Enchantments" and the "Attributes modifiers" tags, the value you need to put is 3 (1+2).

Further information from the wiki:

{HideFlags:INT} The value ranges from 1 to 255, representing 255 combinations or 8 binary digits.

When adding to create a unique value:

Adding 1 hides "Enchantments"

Adding 2 hides "AttributeModifiers"

Adding 4 hides "Unbreakable"

Adding 8 hides "CanDestroy"

Adding 16 hides "CanPlaceOn"

Adding 32 hides other information, including potion effects, shield pattern info, "StoredEnchantments", written book "generation" and "author", "Explosion", "Fireworks", and map tooltips

Adding 64 hides "Dyed" on leather armors

Adding 128 hides "Upgrade" on armors

In logical form:

(HideEnchantments) | (HideAttributeModifiers << 1) | (HideUnbreakable << 2) | (HideCanDestroy << 3) | (HideCanPlaceOn << 4) | (HideOthers << 5) | (HideDyed << 6) | (HideUpgrade << 7)

I also found a video tutorial:

An example command to hide enchantments may look something like:

give @p iron_sword 1 0 {HideFlags:1|ench:[{id:16,lvl:10}]}

1.20.2+ Command for giving a diamond sword with fortune and knockback enchantments hidden (generated using this generator):

/give @p diamond_sword{Enchantments:[{id:fortune,lvl:3},{id:knockback,lvl:2}],HideFlags:1} 1
  • I tried that. Set it to max value. It still shows.
    – Duomax_
    Dec 15, 2023 at 14:02
  • Also thats like 1.8 where the minecraft:sword thing wasnt even there I suppose and that command doesnt even work in the newer versions.
    – Duomax_
    Dec 15, 2023 at 14:03
  • @Duomax_ didn't realize the age of the video... maybe see this? Example: /give @p minecraft:item{HideFlags:#} Or, using this generator for 1.20.2+: /give @p diamond_sword{Enchantments:[{id:fortune,lvl:3},{id:knockback,lvl:2}],HideFlags:1} 1 (see edit)
    – Timmy Jim
    Dec 15, 2023 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .