-1

I've seen examples of how to clear items with specific name or enchants but not both.

This is what I have so far:

/clear @p minecraft:paper 0 1 {tag:{ench:[{id:16s,lvl:1s}]}},{display:{name:"custom name"}}

output: data tag parsing failed: trailing data found at: {tag:{ench:[{id:16s,lvl:1s}]}},<--[here]

  • You're missing some braces, you've got unbalanced brackets, and there might some other errors in your command. It would also help if you included the error message that you get when you run this command. – MBraedley Oct 20 at 16:03
0

I’m expanding your command and pointing out all the errors in it:

/clear @p minecraft:paper 0 1
{ 
    tag:{  # “tag” should not be used in /clear command
        ench:[
            {
                id:16s,
                lvl:1s
            }
        ]
    }
}, # this extra “}” closes the final tag before you get to the display section.
{
    display:{
        name:"custom name" # “Name” misspelled as “name”
    }
}

So in summary:

  • Don’t use tag in the /clear command.
  • Make sure you are balancing your brackets. You used one too many }s.
  • The name tag is misspelled. Correct tag is Name.

Fixed command:

/clear @p minecraft:paper 0 1
{
    ench:[
        {
            id:16s,
            lvl:1s
        }
    ],
    display:{
        Name:"custom name"
    }
}
| improve this answer | |

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.