I’ve been making a server, and I can’t get the worldprotect mod to do block-break deny, so I’ve been trying to set a lot of command blocks manually, and then I got lazy. I’ve been trying to find an answer for this ever since. Here is my command:
//set command_block {Command:"/gamemode adventure @p"}When I try to place it, it gets placed but the command is not in the command blocks. It shows this message:
So, if there is a way to fix this, please tell me the command. Thanks!
51 Answer
WE doesn't support that kind of argument.
Use the /fill command, which goes like this:
/fill [x1] [y1] [z1] [x2] [y2] [z2] [block] [data value] [oldBlockHandling] [data tag]
Say you wanted to fill 100x1x100, you would do something like this:
/fill ~ ~ ~ ~100 ~ ~100 command_block 0 replace {Command:"/gamemode adventure @p"}
Note the ~ means relative coordinates.
But a more logical thing to do would be to set a single command block with this command:
/gamemode adventure @a[r=100]
This would target any player withing a radius of 100 blocks.
2