I am trying to lock some boxes in a map of mine, and I used this command:

/blockdata 10 4 9 {Lock:Elyiana's Mage Key}

At first it worked, but then when I logged back on the next day it gave me this error message:

Data tag parsing failed: Expected '}' but ''' at: {Lock:Elyiana'<--[HERE]  

I don't know why it doesn't like the apostrophe in the key's name. I would change it, but it already worked and locked some other items. My version is 1.12, does anyone have an answer to my problem?

  • 1
    Have you tried surrounding the name with quotation marks?
    – MBraedley
    Jul 4 '17 at 22:47
  • Try using a backslash
    – lkp111138
    Jul 5 '17 at 5:44

As of 1.12 you have to encase Strings containing special characters (including spaces and apostrophes) with quotes (" ").

/blockdata 10 4 9 {Lock:"Elyiana's Mage Key"}

This should do the trick.

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.