Easy Guide: How to Get Barrier Blocks in Minecraft for All Game Modes

If you’ve ever spent hours building a custom adventure map only to have players glitch through your carefully placed walls, or tried to make a floating garden that doesn’t need ugly support blocks holding it up, you’ve probably wished for a block that’s invisible, indestructible, and fully solid for anyone you choose. That’s exactly what barrier blocks are, and they’re one of the most underrated tools for any Minecraft builder or server admin. In this guide, we’ll break down exactly how to get barrier blocks in Minecraft, what you can use them for, and how to avoid common mistakes that waste your time when working with these hidden blocks.

How to Get Barrier Blocks in Minecraft Across All Editions

Barrier blocks are not available in the default creative inventory, even if you have cheats turned on, so you will need to use a /give command to add them to your inventory. You must have cheats enabled on your single-player world or have operator permissions on a multiplayer server to run this command, there’s no way to craft, mine, or find barrier blocks in vanilla survival mode. Modded servers may add them to the creative menu for builder ranks, but the command method works for all vanilla and modded versions of the game. The exact command varies slightly by edition, so follow the steps for your version below:

  • For Minecraft Java Edition: Open the chat window by pressing T, then type /give @p minecraft:barrier and hit enter. You’ll get 1 barrier block added to your inventory immediately. If you want more, add a number at the end, like /give @p minecraft:barrier 64 for a full stack.
  • For Minecraft Bedrock Edition (including Windows 10/11, mobile, and console Bedrock ports): Open chat with the chat button or D-pad right on controller, then type /give @p barrier and confirm. The command works the same across all Bedrock versions, no extra namespace needed.
  • For legacy console editions (Xbox One, PS4, Switch before Bedrock upgrade): You’ll need to enable cheats in world settings first, then use the same Bedrock command above. Note that some very old legacy editions don’t support barrier blocks at all, so you may need to update your game if the command doesn’t work.

Once you have barrier blocks in your inventory, they appear as a red square with a diagonal slash through it when you’re holding them, but turn fully invisible as soon as you place them down. Only players with operator or cheat permissions can see the barrier block icon when they’re holding a barrier block in their hand, so regular players on your server won’t even know they’re there unless they run into them. They’re completely indestructible by any tool or explosion, so you don’t have to worry about players breaking them to access restricted areas.

Common Uses for Barrier Blocks in Your Builds and Worlds

Most new players only use barrier blocks to block off edges of maps, but they have dozens of practical uses for both single-player builds and multiplayer servers. The most popular use is for custom map making, especially parkour or adventure maps. I’ve used this trick for dozens of parkour maps I’ve built over the years, and it’s saved me so much time I used to spend building ugly wooden side rails that clashed with the map’s theme. You can line the edges of your parkour course with barrier blocks to stop players from falling off, without ruining the open, immersive look of your map.

You can also use barrier blocks to create custom collision for decorative builds, like a custom tree that has leaves you can’t walk through even if you use non-solid leaf blocks for a softer look, or a custom statue that players can’t climb on to get to restricted areas. For floating builds like sky castles or floating gardens, barrier blocks work as perfect hidden support, so you don’t have to leave ugly cobblestone or obsidian pillars sticking out the bottom of your build to hold it up.

Server admins often use barrier blocks to protect spawn areas or safe zones in PvP worlds. You can line the entire spawn area with barrier blocks a few blocks thick, so new players can’t be attacked as soon as they join, and griefers can’t break blocks in the protected spawn zone even if you forget to enable spawn protection in your server settings. They also work great for mob farms, since mobs can’t spawn on barrier blocks and can’t walk through them, so you can control exactly where your farm mobs move without using visible blocks that mess up your farm’s efficiency or design.

Troubleshooting Barrier Block Issues You Might Run Into

The most common issue new players run into is the /give command not working. If you get an error message when you run the command, first check that you have cheats enabled on your world. If you didn’t enable cheats when you created the single-player world, you can temporarily turn them on by opening the world to LAN and toggling cheats on in the LAN settings. If you’re on a multiplayer server, you’ll need to ask the server owner to give you operator permissions before you can run the /give command.

Another common problem is forgetting where you placed barrier blocks after you’re done building. It’s easy to lose track of invisible blocks once you move on to another part of your build, and there’s nothing more frustrating than running into an invisible wall you placed 3 days earlier while testing your map. If you lose track of a barrier block, just grab one from your inventory and hold it, and every barrier block in loaded chunks will become visible to you immediately. You can break them like any other block when they’re visible, and they’ll drop themselves so you can reuse them later.

If you run a public server, you might also run into issues with players getting access to barrier blocks to grief other players. To avoid this, make sure only trusted builder staff have operator permissions, and use permission plugins to block the /give command for regular players if you don’t want them spawning in special blocks. You should also note that fast-moving entities like boats or horses can occasionally glitch through a single layer of barrier blocks, so if you’re blocking off a high-traffic area, add a second layer of barriers to stop that from happening.

Creative Ways to Use Barrier Blocks Beyond Basic Builds

Once you get comfortable using barrier blocks for basic edge blocking and support, you can start using them for more unique, creative builds that stand out from regular Minecraft worlds. One of my favorite uses is for custom furniture: you can build a couch out of wool or concrete blocks, then place barrier blocks on top of the seat area so players can sit on the couch without falling through, no need for janky minecart or stair tricks that break easily. You can also make custom tables that players can place items on without the items falling through, even if the table is made of non-solid blocks like glass panes.

You can even use barrier blocks to create custom walking paths for NPCs on your server, so villagers or custom mobs only walk along the routes you set, no need for fence posts or cobblestone edges that ruin the look of your town. For custom puzzle maps, you can make invisible maze walls out of barrier blocks, so players have to feel their way through the maze without being able to see the walls, which adds a fun extra challenge for players.

For minigame servers, barrier blocks make great anti-cheat tools. You can line the edges of your PvP or bedwars arenas with barrier blocks so players can’t glitch out of the map to avoid losing, or block off areas that are supposed to be off-limits during matches. You can also make custom laser dodge minigames where the “lasers” are just thin lines of barrier blocks that players have to jump over or duck under to win, no mods required.

Whether you’re building a small creative world for yourself or running a large public server with hundreds of players, barrier blocks are a versatile tool that can save you hours of work and make your builds look far more polished than they would with regular solid blocks. Once you know how to get barrier blocks in Minecraft, you’ll start noticing dozens of places where they can solve annoying problems you didn’t even realize you had, from ugly support pillars to players glitching out of your custom maps. Just remember to enable cheats first, keep a barrier block in your hotbar when you’re placing them to avoid losing track of them, and only give access to barrier block commands to players you trust on your server.