The Barrier is an invisible block used primarily by map makers and developers to create impenetrable boundaries within the virtual environment. It is completely transparent and can only be seen when holding the item in hand, marked by a red icon with a slash through it. This block prevents players and entities from passing through, allowing for controlled access and movement, as well as the construction of invisible walls for various design purposes.
The numerical item ID for Barrier is 166
Numerical item IDs will only work in Minecraft versions below 1.13.
The item ID for Barrier is minecraft:barrier
This is the spawn command to give yourself Barrier in Minecraft which includes the Minecraft /give command. If you are using the Essentials plugin you will need to use /minecraft:give instead of /give