Question: how to get a barrier block in minecraft command?
Answer: Obtaining. Like a few blocks, such as the command block, the barrier block can only be obtained via commands. By doing the command: /give @p minecraft:barrier <amount> (putting " minecraft: " is optional) will give a player the number of barrier blocks put in the command.