Home / Uncategorized / ✔️ How To Use The Execute Command In Minecraft! ✔️

✔️ How To Use The Execute Command In Minecraft! ✔️

Video Summary

In this video, I explain how to use the Execute command in Minecraft 1.15 and beyond, breaking down three key variations: execute at, execute if, and execute run. I demonstrate practical applications like replacing grass blocks with stone as you walk and creating a kill zone using glass blocks. The execute command allows you to run commands from specific locations or as specific entities, making it useful for creating interactive gameplay mechanics and pranks on multiplayer servers.

How To Use The Execute Command In Minecraft!

Hey everybody, it’s UnderMyCap and welcome back to another Minecraft video! Today I’m going to be showing you how to use the Minecraft execute command in Minecraft 1.15 and over. I just want to say thank you so much to TGIF for commenting and giving me the idea for this video because I had no idea what video to make next, so if you have any ideas for videos you want me to do or any questions, just comment them down below — they don’t even have to be questions, they can be anything! In today’s video I’m going to be talking about specifically the execute if, the execute at, and the execute run command. They all kind of interact with each other so each command might contain all of them, some of them, or even just one by itself.

Execute At

So let’s start with execute at. The execute at command basically executes or performs a command at a certain point. For example: /execute at undermycap. Obviously if you were playing Minecraft Java you would replace “undermycap” with your own name. You can also use it with a whole bunch of other selectors such as all entities, all player entities, random players, nearest players, yourself, and you can also filter by things like type, name, distance, etc. If you saw my last video (links in the description below), I showed you how to execute particles at yourself to make a cape particle effect. In this example we’re going to do something similar but with blocks. We’re going to make it so that if I’m standing on a grass block it will replace it with a stone block. The command looks like this: /execute at undermycap if block ~ ~-1 ~ grass_block run setblock ~ ~-1 ~ stone. Once you run that — boom — there’s stone underneath me! As you can see the stone isn’t following me, but as soon as I touch grass the stone appears. I don’t really see this as the most useful thing in the world, but games such as Hypixel use this command — I think it’s Block Party or Paint — to paint the floor. To get rid of all the really annoying command output messages you can simply use /gamerule commandBlockOutput false. As you can see it’s still doing it without the annoying output spam. If you wanted to make it so that the blocks didn’t require grass and everywhere you went — even if you flew — the blocks followed you, all you have to do is remove the if block condition. I personally find it really annoying because it’s really hard to get around, but if you like it you can absolutely do that! This is actually how I’m pretty sure that command block thing works where everywhere you walked a bookshelf followed you — it’s basically just this command.

Execute Run

As you saw in that example I showed you all three commands basically in one. The execute run command is essentially just the part that tells Minecraft what to actually do. If you put it simply, execute run is just the action portion — it’s the part that performs one of the available Minecraft commands. The execute commands can be very tricky if you don’t know them, but slowly over time you can learn them.

Execute If

Let’s say you wanted to make it so that if a player stood on a glass block they got killed — for example if you didn’t want people to get into a certain area. You can actually do that with the execute command. The command would look like this: /execute at undermycap if block ~ ~-1 ~ glass run kill undermycap. Once that’s running you’ll notice nothing happens normally, but as soon as I place glass on the ground and walk over it — I die! That’s because the execute command is constantly checking if I’m standing on a glass block. This can be very annoying because if you place glass everywhere you won’t be able to get anywhere, but it’s a fun way to troll your friends if you don’t want them going into a certain area, and you can do it with any block you like!

Execute As

Now let’s talk about the execute as command. The execute as command is basically a command that executes something from a player or as something. So if we did /execute as undermycap run say hi, it’s going to execute me saying hi. Simple as that!
Thank you so much for watching this video on the execute command! If you want me to do a more advanced execute command video please let me know down in the comments below. If you have any other video suggestions please leave them in the comments as well. My social links are in the description, and also check out my new website — UnderMyCap.com — links are also in the description below. Make sure to subscribe and like the video! I love posting Minecraft content and unboxings, and I’ve also pre-ordered the new Minecraft Dungeons so when that comes out stay tuned — I’ll try to make as many videos as I can on it and I’ll also try to livestream so I can interact with you all and discover the game at the same time. Thank you so much for watching and I hope to see you in the next video!

Video Thumbnail

Leave a Reply