Hello everyone and welcome back to another minecraft tutorial in this video I’ll be showing you how to build a command block contraption that allows one player to sleep in a bed and change the time today when there are multiple players on a server if you didn’t know the vanilla game requires all the Players on the server to be in a bed at the same time in order to change it today which can be difficult to organise especially when a player is afk this contraption will make things much easier as you only need one player to sleep it will advance time forward until it is Daytime meaning your local difficulty will not be reset when you sleep you can also kick other players out of the bed if you wish for the night to stay the contraption will also be able to sleep through rain and thunderstorms which was once a problem on the hermitcraft server Where this was developed and has now been fully tested too so those are no longer an issue and you’ll be able to sleep through the Thunder and the rain so let’s start the tutorial first of all you’re going to need to know if you’re in the spawn chunks these are the spawn Chunks in my world there is no visible indication to let you know that you’re in them if you don’t know how to find the spawn chunks I’ll put a link on the screen and in the description box below if you go and check that video out it Will help you find these spawn chunks which is where we need to build this contraption now in order to build it we’re going to need to be in game-mode one and we’re going to need to give ourselves some command blocks and to do that you’re going to need to be opie on The server a way to test this is the type slash game mode 1 and if it changes your game-mode than your opie and you’ll be able to give yourself a command block if not you’re going to have to go to the server’s access console and make sure Your player is opie from there and then once you’re in game mode 1 you want to use this command give assumer obviously you’d replace that with your name minecraft command block and then we can get going so this is how you’ll need to lay out your command blocks ignore the 4 Over here we’re just focusing on these ones we’ve got 6 repeating ones in a row at the back and some chain ones in front of them and the way that you place these is important as you can see these are facing upwards we need all of our ones To face forward like this so put the 6 in a row at the back these are going to be set to repeat and unconditional and for now we’re going to set all of the command blocks to needs redstone but later on we’ll set them to always active So the ones in the front our chain command blocks you can see here we’ve set them to Chane they will need to be conditional and once again they’re set to needs redstone but later on will be always active so once you got those set up we’re going to paste some commands into Our chat they’re inside these command blocks you can get them from the description box and we just simply need to put them into chat so the first one is to set up a dummy scoreboard objective called sleep so paste that command into your chat set that up that’s for the command block contraption Obviously and another one here which is a trigger scoreboard called kick bed that’ll be need to be entered into your chat so we can set it up for the contraption then here we have a game rule called command block output force if you are open on the server you’ll see Lots and lots of messages in chat if you want to stop that just use this one set that to false and you won’t see those anymore and those same commands that you’ll see in chat will also be in your logs and in your launcher window as well And so to get rid of those just type in log admin commands for shoes this one right here again you can find all four of those in the description box paste them into your chat and then you’ll be ready to go so the next part of the tutorial you thought might be Complicated no this is going to be the simplest bit of all all you need to do is go down to the description box and copy the commands from there into each of these command blocks so in order for you to know which ones they go into I’ve labeled them like this So over here we have one a in front of it one B then two to the right 3a and 3b four five six and then 6a 6b and 6c so copy all of those from the description box put them inside of the command blocks and now I’m going to Explain how it all works first thing we want to do is be able to count how long a player is in a bed fall so with this command block when a player is sleeping in a bed we’re going to be adding one point of score to the sleep scoreboard Every tick that they’re in a bed so when the player is in a bed this command block will be successful triggering the chained one in front of it which is going to enable the kick bed trigger this command is activated when a player gets in the bed for the first time so When their sleep is a score of one it will execute a command in chat that will allow other players to click on the text that appears and kick that player out of the bed this one finds players that aren’t sleeping yet they have a sleep Score and it sets it to zero so once the flair is out the bed their sleep score is reset and when that command is successful the chain one here is going to disable the trigger that we enabled earlier so when no player is in the bed the trigger will be disabled if there’s Only one player on the server then it takes a hundred ticks for them to sleep in a bed so we’re going to detect when they’ve slept in the bed for more than 100 ticks and then it’s going to start advancing time forward until it reaches Daytime if the player is in bed for 230 ticks then it means that the wear receiver raining or funder II and the player hasn’t been kicked out of their bed so it’s going to run the weather clear command which will make it clear and then the player will get kicked out Of the bed these last three commands are for kicking a player out of the bed the first one is simply going to check that there is actually a player sleeping in a bed and that someone has click the text in chat and enabled the kick trigger that will set off this command block Which is going to summon a snow ball at the player who’s sleeping in a bed which will hit them and kick them out of the bed without that player taking any damage and after that’s executed this one is simply going to reset the kick bed trigger so that is the contraption And how it works it has been tried and tested it is reliable and if you’ve enjoyed this video then please do leave a like as always thank you for your support and a massive thank you to layer layer as well who helped me fix this contraption and get it working for all You guys to use so all of the things mentioned are in the description box down below all the commands and the spawn chunks video if you need it and of course remember to subscribe if you haven’t done so already check out the tutorials playlist for more awesome Minecraft stuff and that’s it from here this video so thank you for watching and I’ll catch you next time bye bye Video Information
This video, titled ‘Minecraft 1.9 1 Server Friendly Multiplayer Sleeping Tutorial (Works On Realms)’, was uploaded by xisumavoid on 2016-04-20 15:30:00. It has garnered views and [vid_likes] likes. The duration of the video is or seconds.
Minecraft Tutorial Playlist ▻ http://www.youtube.com/playlist?list=PLEB388783144C45A8 This video will show you how to build a …