Why doesn't this /give command work?
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.
Best 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
Pictures about "Why doesn't this /give command work?"



Why cant I use some commands in Minecraft?
You can not run game commands in Minecraft until you have turned on cheats. Game commands let you switch between Creative and Survival game modes, change the time of day, change the weather, or summon a mob.How do you turn on give commands in Minecraft?
How to turn on cheats in Minecraft: Java EditionWhy do my command blocks not work?
Due to the power of the command blocks, there are a few conditions that need to be met in order to use them in your server. First, you will need to enable command blocks directly in the server settings. Secondly, you will need to be OP on the server and in creative mode to be able to place the block.Kelly Clarkson - Stronger (What Doesn't Kill You) [Official Video]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Samson Katt, Leon Natan, Markus Spiske, Andrea Piacquadio
