0

I am playing Minecraft on a Nintendo Switch (creative mode with cheats activated) and I am trying to give a barrier block, but for some reason that doesn't work. I am using the command:

/give MYMINECRAFTNAME barrier

and I get a "syntax error unexpected >>barrier<<"

If I do the same with tnt or diamond it works just fine.

Why doesn't this command work and how can I get it to work?

2
  • 1
    If the answer in the duplicate question doesn't work, something might have changed in a recent update
    – pinckerman
    Commented Jul 29 at 18:02
  • Thank you very much for your response! As pointed out in the response to the duplicate question I tried /give@s b to see all the items listed that are available and barrier was not listed. The version of minecraft listed when starting up the program is v.1.2.12 (build April 2018). So maybe I would have to update in order to get it. I have to find out how to do this. Anyways, thanks a lot, I learned so much!
    – sneumi
    Commented Aug 1 at 5:56

1 Answer 1

0

To give yourself a barrier via command, you type:

/give @s minecraft:barrier

Notice that minecraft: is behind barrier. minecraft:barrier is the valid name for giving yourself a barrier via the give command. Hope this helps!

1
  • Thank you for your response! As mentioned above, it looks like I might have an old version and the block is not available.
    – sneumi
    Commented Aug 1 at 5:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.