1

This command is supposed to give me a custom item for a server. Why won't it work?

give @p minecraft:netherite_sword
{
  display: {
    Name: "[{\"text\":\"Kindness (¾)\",\"color\":\"red\",\"italic\":false},
    Lore: ["{\"text\":\"\",This sword was forged from the deep depths of The Blazing Tundra it was weilded by the greatest swordsman in the land but was sadly lost many years ago.\"color\":\"dark_purple\",\"italic\":false}",
    Unbreakable: 1,
    HideFlags: 7,
    Health:32767s,
    Age:-32768,
    Enchantments: [
      {id: sharpness, lvl: 10},
      {id: smite, lvl:10},
      {id: bane_of_arthropods, lvl: 10},
      {id: fire_aspect, lvl: 10},
      {id: knockback, lvl: 10},
      {id: looting, lvl: 10},
      {id: sweeping_edge, lvl:10}
    ]
  }
}
1
  • 1
    Can you explain what that does and why it work?
    – user228576
    Jun 27 at 2:08
0

building off of ginkgo's answer, you do in fact have multiple syntax errors. i'll go through them one by one here.

  1. at Name, unclosed quotes; the full value needs to be wrapped in quotes
  2. at Name, unexpected square brackets ([]); Name does not use square brackets as those are only used in lists, and it can only support one value
  3. at Lore, unclosed square brackets; Lore is a list, and needs to be wrapped in square brackets
  4. at Lore, malformed JSON string; there's an extra quote right after text
  5. at Unbreakable, bad formatting; Unbreakable needs to be a Byte value, which means it needs to have b at the end of it (e.g. 1b instead of just 1)
  6. at HideFlags, bad formatting;

there are also some tags that are simply not used in an item tag that you're giving to someone;

  1. Health; only used in entities (things like mobs, players, etc.)
  2. Age; only used in entities

edit; it's good to try to put it in a single line the way ginkgo did, since that's how commands are typed in Minecraft, but i'll post the command here formatted the way you did;

give @p minecraft:netherite_sword
{
  display: {
    Name: "{\"text\":\"Kindness (¾)\",\"color\":\"red\",\"italic\":false}",
    Lore: ["{\"text\":\"This sword was forged from the deep depths of The Blazing Tundra it was weilded by the greatest swordsman in the land but was sadly lost many years ago.\"color\":\"dark_purple\",\"italic\":false}"],
    Unbreakable: 1b,
    HideFlags: 7b,
    Enchantments: [
      {id: sharpness, lvl: 10},
      {id: smite, lvl:10},
      {id: bane_of_arthropods, lvl: 10},
      {id: fire_aspect, lvl: 10},
      {id: knockback, lvl: 10},
      {id: looting, lvl: 10},
      {id: sweeping_edge, lvl:10}
    ]
  }
}
-1

You have multiple syntax errors. I recreated a working version your command using https://mcstacker.net/:

give @p netherite_sword{display:{Name:'{"text":"Kindness (¾)","color":"red","italic":false}',Lore:['{"text":"This sword was forged from the deep depths of The Blazing Tundra it was weilded by the greatest swordsman in the land but was sadly lost many years ago.","color":"dark_purple","italic":false}']},HideFlags:7,Unbreakable:1b,Enchantments:[{id:"minecraft:sharpness",lvl:10s},{id:"minecraft:smite",lvl:10s},{id:"minecraft:bane_of_arthropods",lvl:10s},{id:"minecraft:knockback",lvl:10s},{id:"minecraft:fire_aspect",lvl:10s},{id:"minecraft:looting",lvl:10s},{id:"minecraft:sweeping",lvl:10s}]} 1

You also had some extra data, Health:32767s,Age:-32768, that I removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.