how do you hide command blocks?

how do you hide command blocks? - Patient showing stop gesture in light clinic

I am making a server, and I want to teleport the closest player to a certain area. But I don't know how to make the command blocks invisible, so the players don't see them. Does anyone know how?



Best Answer

You can have commandblocks somewhere else (however prefered in same chunk to have it loaded), then use alternative command syntax.

/tp @p[x=100,y=64,z=100,r=3] ~0 ~30 ~0

..this commandblock will look at given XYZ coordinates and will search for nearest player in radius of 3 blocks. Then it will teleport him 30 block up (relative to player in case of /tp - but you can use also hard-coded coordinates)

For activating the commandblock, you can make it always active (via CB settings or redstone clock), thus it will teleport players whenever they enter the scanned area. Or you can make some redstone circiut, or wireless redstone (via mods, plugins, or via another commandblocks - if you need some advanced computing and have only sparse space, you can use only one CB (with button-like activation) to just place redstone block on another place, then activating the circuits)

For more study how this works, you can read the wiki article about command syntax, what other target selectors you can use etc, here.




Pictures about "how do you hide command blocks?"

how do you hide command blocks? - Anonymous cool ethnic male band with Afro hairstyle and covered eyes illuminated by artificial light
how do you hide command blocks? - Back view of sensual black woman in white denim and white red sweater holding Gypsophila flower behind back posing on black backdrop
how do you hide command blocks? - Unrecognizable young upset female millennial with dark hair in stylish sweater covering face with hand while siting on chair at home



How do you hide commands in Minecraft?

Only operators can see command output from players. And now, if you run your command through the command block, no one will be able to see the output in chat. However, the /give and /gamerule commands you did will still be visible in chat.



How To Disable Command Block Messages In Chat | Minecraft PS4/Xbox/PE/Java




More answers regarding how do you hide command blocks?

Answer 2

Hide them under the ground, or if you have a pressure plate over said command block, you can move the command block a block lower and add a wool block over it along with the pressure plate.

Answer 3

You can use the Barrier block to cover the command block.

Barriers are not listed in the creative inventory (similarly to command blocks and structure blocks) and can only be obtained using commands, such as /give minecraft:barrier.
From: http://minecraft.gamepedia.com/Barrier.
After obtaining the barrier block, simply select the Barrier block and place it around the command block. How the Barrier block looks like and the properties of it can be found here: Barrier Block

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: SHVETS production, Asiama Junior, Anna Shvets, Liza Summer