Hello everyone my name is Kubek and welcome back to yet another episode of Minecraft today guys we’re gonna be doing a command block tutorial for 1.15 all about protecting it spawn or protecting your base for the matter so something that I ran into an issue I Guess I ran into an issue with one of my buddies on recent multiplayer server that we created was the ability to protect your area from being grieved by other players it’s not really something that occurs on the server but we wanted to protect from it just in case and we Want to protect from players being able to break things etc because you know you put a lot of work into your base you want it to be protected from anybody just making a silly mistake or anything like that so we went ahead and developed something that is pretty cool a simple Command block system that will protect your area from being from players being able to set break blocks or anything like that now I must disclaim very quickly this is not protected players from being able to access your chests so if you have chests in your base it is best that you hide Them somewhere or you don’t have them in the area you’re trying to protect because there’s no real way to protect from that but let’s go ahead and demonstrate the command so we’re gonna jump into game mode survival I keep pointing take game-mode 0 we’re in game mode survival right now Okay and say that area where those command blocks are is where we want to protect from so as we get closer to it it switches us into adventure mode now we can’t break any blocks anywhere around here we can’t access any of these command blocks normally we can’t anyway Not unless weren’t creative but if we run away it switches us back to survival so now we can break blocks and iron blocks one off the solution here oh yeah you guys can see we can ion break blocks and if we go closer its wishes us to Adventure and we cannot break any blocks this is a really cool way to protect your areas from being I guess broken into or anything like that so let’s jump into the command alright guys so the first thing we need to do is we need to place down a Repeating command block now the settings for this command block needs to be always active repeating and unconditional okay so it’s very important that it’s always repeating and what we need to do is run a command called execute and I can’t type today execute if entity at E and we need to do Type can’t type today needs to be minecraft : lair then do a comma name equals and then we need to do this will be where your username goes so my username is cubic plays keep it applause cubic plays MC then we need to do another comma and then we Need to do distance equals now this is where things get a little interesting what we need to do for distance equals an equal sign there is period period 15 okay and then close off your command alright so what this will basically do for us guys is allow us to basically if We go all the way back is what we’re saying is execute which means command block will not it been a redstone signal if so we’re saying if there’s an entity and then we’re describing what the entity should be so at E is entity the type is a minecraft player with the name My username being cubic place MC and then the distance being anywhere from roughly 0 to 15 blocks I’ll just get rid of the equal sign there anywhere from 0 to 15 block so that’s why the two periods exist if we just do 15 then it’ll only target 15 blocks we want Within 15 blocks ok so then what we need to do is then put down two comparators alright guys so the second thing we need to do with this command is we need to write a command for setting players to event Kermode so we’re gonna do game-mode Adventure at a distance and then we need to do equals when you do either of 0.15 or just dot dot 15 it’s really up to you and you need to do then game mode I cannot type today and we need to then say anybody who’s in survival and then We need to do a name equals now this word gets very specific we need to do two quotations and that we need to do exclamation point hashtag and then you take user name so let’s keep it plays MC okay and then we need to close off our Command okay and so what this command is doing for us is it saying set anyone who’s in set anybody to game-mode adventure at a so anyone with a distance between 0 to 15 so 0 to 15 from this command block and then set their game mode to survive or sorry if their game Mode is survival that’s right so we’re setting to adventure if their game mode is survival and their name is not my name not cubed plays MC so this will be your user name or the person’s plot that you’re trying to protect so then it will exclude anybody with that user name so I Had done and then what we need to do is come over here remember the sort command block that originally detects us then we need to put down a block a redstone torch then we need to put down a repeating command block and a chain command block and I’ll show you the Settings for the both of these here in a moment but basically what we need to do is say this needs redstone it’s repeating and then we need to write a command that says /gamemode adventure at a distance equals zero dot dot 11 game mode equals and then when you said to Survival okay and then we need remember repeating unconditional needs redstone okay the second thing we’re going to do is income it says chain command lock which is set to chain unconditional always active and what we need to do is say /gamemode survival and then we need To at a distance 14 dot dot 16 and we’re into game mode game mode equals adventure okay and then we’ll hit done so now our command is ready to go basically what we’re doing is we’re saying anybody within a distance of 15 blocks so it’s detecting for me Basically and we’re saying anybody with who’s not me within 15 blocks needs to be set to adventure okay and what we’re then saying is anybody who is an adventurer in East Coast survival anybody within 11 blocks 11 blocks is actually the radius that we’re protecting and there’s a very specific Reason for this and I’ll explain that in a second and then we’re saying anybody in a game mode set them to survival once they’re outside of the radius of our detection which is between 14 and 16 we could set it to 17 if we wanted to but We’re trying to be very specific because we’re detecting for 15 blocks okay what is happening is its these comparators going off and they’re detecting me so what we want to do is make sure that me the player the whoever’s the plot is is being detected first okay so that’s why We set this to 15 blocks then we’re saying anybody that’s not me should be in adventure okay then as a backup if I am not here it’ll activate these command blocks which will then say anybody who is in adventure or sorry set anybody in adventure says anybody who’s In survival there we go to adventure within a distance of 11 blocks and we could say we could probably set this to like maybe twelve or thirteen but we need to we need to kind of preserve this 14 to 16 to set people back to survival Okay and so what we’re doing is we’re saying that if I’m not here activate these command blocks if I am here activate these two command blocks so people can come into my plot if I am there or they can not come into my plot If I’m not there and so we will – and so basically if we change this name to cubic place M which is not my name so it’s no longer detecting me and keep it place M it’s no longer take me there I set our game mode to survival We will then be set to adventure and I think we’re getting caught by this one if I’m not mistaken as well one second it’s disabled yeah disabled lose things for a second back in Survivor so yeah now we’re in adventure and once we go out of the area it’ll set us back to Survival but anyways guys I hope you guys enjoyed this tutorial let me know if you guys need any help or any technical advice I will be happy to respond in the comments on how this command block works obviously all the commands will be in the description so You can copy them obviously I can’t explain how each command works in the description so you’ll probably want to make sure that you watch this video a couple times just to understand what’s going on and where to put the commands it’s a pretty simple compact to command Block setup I hope you guys enjoyed and I will see you guys in the next video bye-bye you Video Information
This video, titled ‘Spawn Protection / Anti-Griefing System | Minecraft Tutorial 1.15 Command’, was uploaded by CubicPlays on 2020-03-26 13:12:41. It has garnered 41274 views and 967 likes. The duration of the video is 00:10:58 or 658 seconds.
We’re back! Today I am showing you a command for protecting spawn areas and bases with a simple command. Easy to set up and works for multiplayer servers.
Command #1: execute if entity @e[type=minecraft:player,name=”CubicPlaysMC”,distance=..15]
Command #2: /gamemode adventure @a[distance=0..15,gamemode=survival,name=”!#CubicPlaysMC”]
Command #3: /gamemode adventure @a[distance=0..11,gamemode=survival]
Command #4: /gamemode survival @a[distance=14..16,gamemode=adventure]
(I apologize for some of the stutters. It’s been a while since I’ve done YouTube videos and I’m really excited to be back at it!)
Intro & Outro Music Tidal Glide (Credits) – zircon https://www.youtube.com/watch?v=EL9rOPKxeEI
Follow Me On Twitter: https://twitter.com/CubicPlays