0

I'm trying to give myself an item that will keep in my inventory when I die. This is my current command that I got from a YouTube video:

give InstantNuggets compass 1 0 {"keep_on_death"{}}

Unfortunately this command is not working. The error message I am receiving is:

Syntax error: Unexpected "{" at "p_on_death>>{<<}}"

What is wrong with my command? How can I fix it?

1
  • We are not a forum: we expect users to put effort into spell-checking and formatting their questions and answers to the best of their ability. I've fixed up your question so that it meets our standards, but others will simply downvote it and leave. Please do your best to ensure your question looks clean, neat, and tidy before submitting it.
    – One 2 Many
    Commented Sep 30, 2021 at 22:29

1 Answer 1

2

You're really close, all you're missing is a :.

give InstantNuggets compass 1 0 {"keep_on_death":{}}

The component in the give command is a json object and as such it requires a : between the key ("keep_on_death") and the value ({}).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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