TransWikia.com

Why doesn't this /give command work?

Arqade Asked by user264239 on June 8, 2021

So basically I have this command,

give @p sign 1 0
{
    BlockEntityTag:{
        Text2:"{"text":"Don't Click me","strikethrough":true}",
        Text3:"{
            "text":"Click Me!",
            "italic":true,
            "underlined":true,
            "clickEvent":{
                "action":"run_command",
                "value":"/setblock ~ ~100 ~ repeating_command_block{
                    Command:"/gamemode creative @a",
                    auto:1}
                "
            }
        }"
    },
    display:{
        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.

One Answer

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

Answered by Ben on June 8, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP