So basically I have this command,

give @p sign 1 0
        Text2:"{\"text\":\"Don't Click me\",\"strikethrough\":true}",
            \"text\":\"Click Me!\",
                \"value\":\"/setblock ~ ~100 ~ repeating_command_block{
                    Command:\\"/gamemode creative @a\\",
        Name:"Custom Sign"

Which in theory, when activated it should spawn a sign which when placed and right-clicked should spawn a repeating command block 100 blocks in the air which sets everyone in the server (@a) to creative mode. Although when I try to use it, only the "/give @p) part isn't red. I don't know much about commands but I can't seem to find anything wrong with it. Any help would be appreciated. Also I'm in version 1.16.4.

  • after posting the thread, basically i've scrapped the idea and have switched to a new idea. if anyone wants to solve it for anyone who might wanna use it is free to do so. thanks bye – user264239 Jan 6 at 0:33
  • What version of Minecraft are you playing? – ExpertCoder14 Jan 6 at 2:12
  • @ExpertCoder14 you can assume Java cause 1.16.4 only exists in Java - there's no way this was a typo from 1.14.50 (education) or 1.16.201 (bedrock) – Penguin Jan 6 at 2:27
  • 1
    Is this command written in a function? If so, you can't use newlines as the interpreter treats every new line as a new command. Also, do you know if there's any error output when running the command? – Ben Jan 6 at 11:09
  • @Ben It's not written with line breaks. That was my edit, to expand the NBT data to make it easier to read. It was all one one line before, but that made it impossible to read. – ExpertCoder14 Jan 6 at 17:44

There are 3 things wrong with this command:

Firstly, the sign item name has been renamed to oak_sign (for definite future-proofness, I'd recommend you use minecraft:oak_sign instead).

Secondly, positioning for the NBT tag of an item is right after the item name itself. For example:

/give @p minecraft:oak_sign{display:{Name:"{\"text\":\"My Custom Name\"}"}} 1

Thirdly, I tried running your exact command and the syntax for the NBT data didn't seem to be correct. I can't figure out why, but if anyone can they should feel free to edit 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.